Neglect datapoints for a plot

Suppose I have this signal that ranges from 2000-7000 seconds and I want to neglect everything after 7000 seconds because it remains a constant value. How would I do this?

 採用された回答

Star Strider
Star Strider 2012 年 10 月 19 日

0 投票

If you have a time vector t corresponding to your signal vector f:
t_idx = find(t <= 7000);
f1 = f(t_idx);
t1 = t(t_idx);
Using f1 and t1 avoids overwriting your original f and t vectors.

3 件のコメント

T
T 2012 年 10 月 19 日
What if there are peaks before 2000 that I want to neglect?
Walter Roberson
Walter Roberson 2012 年 10 月 19 日
t_idx = find(t >= 2000 & t <= 7000);
Star Strider
Star Strider 2012 年 10 月 19 日
Thank you, Walter.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

T
T
2012 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by