Respondida
How to calculate width and height of histogram
I'm not sure I understand that information is returned by hist() X = randn(100,1); [N,bincntr] = hist(X); Now you kno...

alrededor de 12 años hace | 0

| aceptada

Respondida
This code for ant colony optimisation is showing (??? Undefined function or method 'ACO' for input arguments of type 'char'.) error, how do I correct it?
I think you have several issues in the excerpt you posted above, I have reformatted a bit. Download the attached aco.m file and ...

alrededor de 12 años hace | 0

Respondida
implementation of mean shift filtering for 1 dimensional array
You can just do x = detrend(testdata,0); Now compare: subplot(211) plot(testdata) subplot(212) plot(x)

alrededor de 12 años hace | 0

Respondida
How to use integration function?
int() is for symbolic function. Use integral with a function handle. Or use one of the other numerical routines, trapz(), cumtra...

alrededor de 12 años hace | 0

Respondida
plotting tan(x) - basic student's question
tan(x) is periodic with period pi and "blows up" at odd multiples of pi/2 so why not just plot one period? dx = 0.01; x ...

alrededor de 12 años hace | 1

Respondida
svd - what are the principal components?
To compute the principal components using the SVD, I think you first want to center the data and compute something at least prop...

alrededor de 12 años hace | 0

Respondida
Function 'subsindex' is not defined for values of class 'tf'.
Giacomo, likely in your program you make the mistake of creating a variable called step. Then you try to index that variable ...

alrededor de 12 años hace | 0

Respondida
unable to input using filename (dxf)
If you want this to be a string, you need to enclose it in single quotest filename = input('Type the name of the dxf-file:'...

alrededor de 12 años hace | 0

Respondida
How to write a function that returns a graph?
You can simply not have an output argument function myplot(x,y) plot(x,y) end That's one way

alrededor de 12 años hace | 2

Respondida
I have Matlab R2011a version. I want to convert .slx file to .mdl file. Please give me some suggestion for the conversion
If somebody has given you a .slx modeld from a more recent version of Simulink, ask them to simply save it in the earlier versio...

alrededor de 12 años hace | 0

| aceptada

Respondida
Help with a scatter3 plot
Why not use quiver3() if you want vectors x =[ -1.0393 0.0844 1.3133 0.1248 1.4003 -0.6345 1.40...

alrededor de 12 años hace | 0

| aceptada

Respondida
Unique random number (between 1 and 40)
Why not just use randperm() x = randperm(40); If you want to randomly select a subset K = 10; x = randperm(40,K)...

alrededor de 12 años hace | 0

| aceptada

Respondida
How to a creat a sweeping radius, like that of a radar.
It's easy enough to simulate that, but are you just interested in something for visual effect? In other words, not tied to any u...

alrededor de 12 años hace | 0

Respondida
how can i plot graph one above another with same X-axis and changing Y-axis(attaching a rough model i need)
X = randn(100,3); X(:,2) = X(:,2)+10; X(:,3) = X(:,3)+20; subplot(311) plot(X(:,1)); ax1 = gca; set(ax1,'xtick',[]); se...

alrededor de 12 años hace | 1

Respondida
How can avoid the error: Error using fclose Invalid file identifier. Use fopen to generate a valid file identifier. Error in open837 (line 4) fclose(fid);
What is fid = fopen('18oct2013-121730.837', 'r'); returning, a -1? You can use [fid,msg] = fopen('18oct2013-1...

alrededor de 12 años hace | 1

Respondida
I'm trying to produce a sampled piano note and I keep getting the error "Index exceeds matrix dimensions." I'm not sure where i've gone wrong :/
Without commenting on your code, the following should fix your problem for i = 1:length(Frequencies) Signal = Sign...

alrededor de 12 años hace | 0

Respondida
how to make a function - keep getting errors
How is your function supposed to know what LE() and ME() are for starters? Or FH()? You do not provide those arrays as input ...

alrededor de 12 años hace | 0

Respondida
eliminating rows in a file (rookie question)
Using your example A = [123 2.334 645 3.445 1234 4.246 2450 5.332 2901 6.092 3287 6.345 3991 7.764...

alrededor de 12 años hace | 0

Respondida
Omitting negative pixels in the image representation
Depending on your data and application, you can just take the absolute value. If that doesn't work you can set all the negative ...

alrededor de 12 años hace | 0

Respondida
i dont know that warning massage . Please help me as soon as posible
It means that the function parfind.m has an output argument in its function signature called parpos and that is not being comput...

alrededor de 12 años hace | 0

Respondida
Problem with FFT analysis of longer data sets
One thing that immediately comes to mind is that if you know the frequency of the sinewave, you should always pad the fft() so t...

alrededor de 12 años hace | 1

Respondida
how to execute the algorithmic operations like summation, cross etc. in matlab?
You can use dot() to compute the inner product of two vectors. norm( ) to compute the norm, since the norm induced by the inn...

alrededor de 12 años hace | 0

Respondida
Errors when trying to computer DTFT?
You're not assigning X anything in your function except zeros Minimally, in your for loop, you should be doing something like...

alrededor de 12 años hace | 0

Respondida
Errors when trying to computer DTFT?
you misspelled length() There is no MATLAB function, lentght()

alrededor de 12 años hace | 0

Respondida
How to enter the R-square fit formula in the m-file?
Residual sum of squares residsumsq = norm(y-yhat,2)^2; Total sum of squares tsumsq = norm(y-mean(y),2)^2; R2 =...

alrededor de 12 años hace | 0

| aceptada

Respondida
How do I reshape a dataset?
When you say dataset, do you just mean a matrix? X = randn(288,35); Y = X.'; If the elements are all real-valued, ju...

alrededor de 12 años hace | 0

Respondida
How to generate matrix using MATLAB ?
I'm sure there are many different ways: X = zeros(1,96); X(1:4) = 1; K = 0; for nn = 1:24 Y(nn,:) = circshift...

alrededor de 12 años hace | 0

Respondida
i need help for string code
When you write a1 = 1; a2 = 2; You are creating two new variables with values 1 and 2. What about: vals = {'1...

alrededor de 12 años hace | 0

Respondida
When Using the Discrete Wavelet transform using a Haar filter, i get negative values and the dynamic range goes up to well over 400
Hi Daniel, I surprised you say that the LL image contains negative values. That I don't observe (nor would I expect it) for your...

alrededor de 12 años hace | 0

| aceptada

Respondida
How to plot the spectrum of a high frequency sine wave of above 1GHz
Do you have the Signal Processing Toolbox: Fs = 4e9; t = 0:1/Fs:0.001-(1/Fs); x = cos(2*pi*1.5e9*t); [Pxx,F] = per...

alrededor de 12 años hace | 1

| aceptada

Cargar más