Plot every nth data point

49 ビュー (過去 30 日間)
Isabella Iaccino
Isabella Iaccino 2017 年 9 月 19 日
回答済み: James Tursa 2017 年 9 月 19 日
So I have a 1:3002 matrix/vector and I want to plot every 30th data point against time (so t=30 for the 30th data point, t=60 for the 60th etc) How do I do this? Is this even possible?

回答 (1 件)

James Tursa
James Tursa 2017 年 9 月 19 日
v = your vector
t = 1:numel(v);
plot(t(30:30:end),v(30:30:end)); % <-- assuming you want to start at 30th element

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by