フィルターのクリア

Average value of a graph after steady state has been reached.

3 ビュー (過去 30 日間)
Leo
Leo 2012 年 4 月 3 日
Good afternoon. I have a graph that has an unsteady period for the first second then for the rest of the time period it oscillates steadily. I want to be able to select only the steady part of the graph. Here is a simplification of my code: (assuming that the graph is y vs sin(x) because my function is quite complex, but the principle should be the same)
x=(0:0.1:10); y=sin(x); b1=8; x1=x(b1:end); y1=y(b1:end); figure plot(x1,y1)
so I am trying to plot the values of the graph from x=8 on-wards, which doesn't happen when I enter plot(x1,y1) any help is greatly appreciated. Thanks, Leo

採用された回答

Thomas
Thomas 2012 年 4 月 3 日
If I understand your question right you want only values for x>=8 and plot y accordingly
x=(0:0.1:10); y=sin(x);
x1=(x(x>=8));
y1=y(numel(y)-numel(x1)+1:end);
plot(x1,y1)
  1 件のコメント
Leo
Leo 2012 年 4 月 3 日
Thanks that works perfectly

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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