Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 12 Jahre vor | 0

Beantwortet
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)

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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 ...

etwa 12 Jahre vor | 1

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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 ...

etwa 12 Jahre vor | 0

Beantwortet
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:'...

etwa 12 Jahre vor | 0

Beantwortet
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

etwa 12 Jahre vor | 2

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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)...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 1

Beantwortet
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...

etwa 12 Jahre vor | 1

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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 ...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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 ...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 1

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

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

etwa 12 Jahre vor | 0

Beantwortet
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 =...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 1

| akzeptiert

Mehr laden