How to plot the large set of fft matrices , no. of matrices is i.

Réponses (1)

Walter Roberson
Walter Roberson le 4 Fév 2012
This appears to be the same question as your http://www.mathworks.com/matlabcentral/answers/27995-plot-matrices . I proposed a method there a number of hours ago. If that method was not satisfactory then you should indicate more clearly what you would like to see.
Remember, a mesh is a 3D plot, so if you are going to plot a series of meshes, you need to decide how you want each one to appear relative to the other.

8 commentaires

actually I have 3000 fft matrices, I expecting for 3 D plot, but while doing operation mesh(abs(m)), m is matrices I am getting the error as
??? Operation terminated by user during ==> dft_tran1 at 37
??? CData must be an M-by-N matrix or M-by-N-by-3 array
Error in ==> graph3d.surfaceplot.surfaceplot>localConstructor at
136
h = graph3d.surfaceplot(argin{:});
Error in ==> graph3d.surfaceplot.surfaceplot at 7
h = localConstructor(varargin{:});
Error in ==> mesh at 109
hh =
graph3d.surfaceplot(x,'FaceColor',fc,'EdgeColor','flat',
...
Error in ==> dft_m at 37
mesh(abs(m))
these three thousands matrices are continous,
"??? Operation terminated by user" corresponds to pressing control-C to interrupt. When you press control-C then the error message after that is usually not meaningful.
If you have 3000 fft matrices, then you are definitely not want to put each of them in to a subplot() as I coded in your other question.
How do you want the 3000 3D meshes to appear relative to each other?
If your display is 1280 x 1024, then if your 3000 individual plots averaged more than roughly 20 pixels by 20 pixels, the plots would have to overlap.
Do you really need to display them all at the same time, or do you just need to generate them and save each plot to a file?
i need to display them all at the same time,
You want them to all be superimposed on each other? You want them in subplots? You want a 2D array of them but all shown simultaneously on your screen? You want only some of them visible at any one time, with the area scrollable? You want them sort of like a "waterfall" plot? You want to construct a 3D object and do isosurface drawings within it? You want to put a number of plots in the same area with each one distinguished by color?
Perhaps instead of a mesh, you would prefer to display each as an image color-coded by amplitude?
I want like a water fall plot
Assuming your array of fft results is named "a" as in your earlier fft question, and assuming that it is the third dimension that selects the plot number, as in that earlier question:
aabs = abs(a);
maxmag = max(aabs(:)) * 1.03; %3 percent spacing between plots
numplots = size(a,3);
zoff = 0;
for P = 1 : numplots
mesh(aabs(:,:,K) + zoff);
hold on
zoff = zoff + maxmag;
end
Note: if your data matrices have not each been normalized to have a mean of 0, then the maximum magnitude for any one fft() is quite likely going to occur at fft output bin index 1, which will have a value of the mean of the signal multiplied by the number of points in the signal (e.g., the total energy that the mean contributes.) For typical non-normalized signals, this first bin will be hundreds of times the rest of the coefficients, giving a spike there that makes everything else hard to see.
The code I gave here assumes that you know what you are doing and will *not* attempt to squish those peaks. The code will space the meshes in Z by a constant Z increment to the base, such that there is no possible Z overlap in drawing the meshes.
If you prefer a different spacing strategy, you can adjust the maxmag calculation.
thanks walter
can you please answer the "for if" question

Connectez-vous pour commenter.

Catégories

En savoir plus sur Axes Appearance dans Centre d'aide et File Exchange

Produits

Tags

Question posée :

le 4 Fév 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by