Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 12 ans il y a | 0

Réponse apportée
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)

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 0

Réponse apportée
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:'...

plus de 12 ans il y a | 0

Réponse apportée
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

plus de 12 ans il y a | 2

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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)...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
Errors when trying to computer DTFT?
you misspelled length() There is no MATLAB function, lentght()

plus de 12 ans il y a | 0

Réponse apportée
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 =...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 1

| A accepté

Charger plus