Store Output Values from All Iterations obtained by nested for loop and display minimum output and it correspond to which input values ?
古いコメントを表示
for c=[5 15]
for hh=[2 7]
ug=c/hh
end
end
3 件のコメント
David Hill
2022 年 3 月 17 日
You need to keep track of the total count in the nested loops and index ug.
count=0
for
for
count=count+1;
ug(count)=c/hh;
end
end
Then you need to keep track of the minimum. A simple if statement will do the trick. Incorporate the above and if you have additional questions ask.
Vedant Chauhan
2022 年 3 月 17 日
Vedant Chauhan
2022 年 3 月 18 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!