how to get the index from the plot for a specific condition

1 ビュー (過去 30 日間)
Here is my code:::::
myX = [4453,5157,1,2302,191,1294,402,4340,1,2145,1,705,1322,1450,1210,1310,1209,1300,1475,1603];
threshold = 1200;
plot(myX)
I need to store the index of values which is greater than 1200.
like
myans = [1,2,4,6,8,10,13,14,15,16,17,18,19]
any idea..

採用された回答

KSSV
KSSV 2021 年 2 月 11 日
idx = myX>1200 ; % logical indexing
myX(idx)
idx = find(idx)
  1 件のコメント
Saravanakumar Chandrasekaran
Saravanakumar Chandrasekaran 2021 年 2 月 11 日
It works well... Thank u

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

その他の回答 (0 件)

カテゴリ

Find more on Graphics Performance in Help Center and File Exchange

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by