How to find the iteration number which gave me specific result?

2 ビュー (過去 30 日間)
Abhinav
Abhinav 2014 年 11 月 25 日
回答済み: Sean de Wolski 2014 年 11 月 25 日
Say I am generating an array in matlab using for loop. In that array I have to find which value is minimum, so I used min function to find out. No I want to find out which iteration gave that result. How can I achieve this?

採用された回答

Sean de Wolski
Sean de Wolski 2014 年 11 月 25 日
Store the iteration number as well as the minimum.
Or just use min with two outputs
[minv, idx] = min(A)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by