New to Matlab and trying to find the index of a height y when it first becomes negative on my plot.

 採用された回答

Mischa Kim
Mischa Kim 2014 年 10 月 29 日

1 投票

Steven, use something like
x = 1:0.1:5;
y = sin(x); % this would be your height
ind = find(x==min(x(y<0)))

その他の回答 (0 件)

カテゴリ

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

質問済み:

2014 年 10 月 29 日

回答済み:

2014 年 10 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by