Setting threshold in my plot

suppose if i have x data which ranges from 1:16000 and there is y data which covers wide range of values from min - 0 to max - 150, now i set my threshould for y as 110
i want my condition to be as,
if y > 110 to display plot for the section of data in which y exceeds 110, how can i do this

回答 (1 件)

VBBV
VBBV 2020 年 12 月 22 日

1 投票

%true
ylim([111 150])
Use this after plot command

2 件のコメント

Vedhashree M
Vedhashree M 2020 年 12 月 29 日
Thanks it worked
Adam Danz
Adam Danz 2020 年 12 月 29 日
If you just want to plot the data that meets your threshold, use indexing.
idx = y > 110;
plot(x(idx), y(idx))
assuming x and y are vectors

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

カテゴリ

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

質問済み:

2020 年 12 月 22 日

コメント済み:

2020 年 12 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by