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!