how to make a CWT like plot - spectral plot

조회 수: 12 (최근 30일)
er
er 2011년 6월 28일
Hello,
I have a 3d matrix Z with the elements (t,f,a)
t= time
f= instantaneous frequency
a= instantaneous amplitude
(t,f,a) = at time t, the frequency is f and the amplitude is a. I want to make a continuous wavelet like plot of this or in general I want to make a colorful spectral plot out of this information, where t will be the x axis, f will be the y axis and the color of the point will depend on a.
I would be grateful if you could help me how to work this out.
Thanks!
  댓글 수: 2
Walter Roberson
Walter Roberson 2011년 6월 29일
If it was a 3D matrix, the times and frequencies would be implicit in the axes. It sounds to me as if what you have is an N x 3 list of (t,f,a) values instead. Were the times and frequency sampled over regular intervals, or are the points irregularly spaced?
er
er 2011년 6월 29일
yes actually i have a Nx3 list of (t,f,a) values. This is a better way of explaining the data, and yes t and f are sampled over regular intervals.
To make it more simple, what I am trying to do is;
I want to make a plot on an x-y plane with different colors. t will represent the x axis, f will represent the y axis and a will represent the color(amplitude) of that point. It will be like the cwt plot.

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

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 29일
You can use imagesc() or scatter() to create those kinds of plots. Scatter would be easier to implement but since your coordinates are regularly spaced you could grid your data fairly easily. Or use griddata() to do the gridding for you.
There is pcolor() as well, but that interpolates colors between points, giving an (N-1) x (M-1) output rather than an N x M output.
  댓글 수: 1
er
er 2011년 11월 2일
Hello Walter,
thanks for the answer and sorry for my late reply since I was not able to work for sometime.
I tried to do it as imagesc(x,y,z) and it works. Thanks for the help!
I am trying to plot this not for a single y vector but for a set of y vectors. The plot of continuous wavelet transform can be taken as an example of what I'm trying to do. What should I do in this case? I'd be glad if you could help me find a way for this.
Thanks again!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by