フィルターのクリア

How can i ignore a trend for the first part of an array?

1 回表示 (過去 30 日間)
yashvin
yashvin 2016 年 8 月 22 日
回答済み: KSSV 2016 年 8 月 22 日
Hi, I have an array which represents a change of altitude values:
A = [0,10,50,100,170,230,300,400,500,600,700,450,250,220,200,190,180]
I want to find the index of the values which are less than 240. In the above array, we have 2 solutions: either the number 230 which is index 6 or number 220 which is index 14. How can i ignore the first index so that in the end i always get the second index which is 14 ?
My trend is always increase of altitude, then decrease of altitude..

採用された回答

KSSV
KSSV 2016 年 8 月 22 日
To find the indices which are less then 240 use:
idx = find(A<240) ; % idx are the indices

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by