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

조회 수: 1 (최근 30일)
Amit
Amit 2012년 2월 4일
편집: Azzi Abdelmalek 2013년 9월 29일
plz help

답변 (1개)

Walter Roberson
Walter Roberson 2012년 2월 4일
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
Walter Roberson
Walter Roberson 2012년 2월 4일
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.
Amit
Amit 2012년 2월 4일
thanks walter
can you please answer the "for if" question

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by