Problems with a plot
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hi,
I want to plot in Matlab the frequency of a system (vector of dimension of 1800000 * 1) between 11:00 am and 16:00 pm. My time vector has also a dimension of 1800000 * 1, containing the time sampled in milliseconds (there are 100 samples for each second). I would like to plot all the frequency with the time axis showing the time (i.e. 11:00 – 11:10 - … 16:00) but not showing the milliseconds. How can I do that?
Thank you
댓글 수: 1
dpb
2015년 2월 26일
...time vector ... of 1800000 ... to plot all the frequency with the time axis...
Let's see...your display might have something like 2000 pixels in the x direction? That'd mean about
>> 1800000/2000
ans =
900
>>
points per pixel at best. Methinks that's probably overdoing it somewhat as to what it makes any real sense to plot. Either decimate the vector by sample at (say) 900 as
plot(t(1:900:end),signal(1:900:end))
to get roughly 2000 points plotted or, if you really think you might miss an important feature/peak bound somewhere in that unsampled section, keep only the max(abs(signal)).*sign(signal) over that grouping.
답변 (1개)
dpb
2015년 2월 26일
0 개 추천
Just answered very similar question at
The frequency is different but the ideas are the same, just fixup the axis tick values to match what you want instead of the two hours there. Note, however, that unless you spread the axis on a wide monitor you'll probably have more than you can accommodate at 10-min intervals. But, "salt to suit"...
댓글 수: 2
Claudia Rahmann
2015년 2월 26일
dpb
2015년 2월 26일
Show your work...can't see your monitor from here.
What is the initial/last time series value and where(to what values)/how did you set the axes limits?
Show the datetick command and relevant sections around it...
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!