How to select the indexes of maximum 3 values in the array without sorting?
1 回表示 (過去 30 日間)
古いコメントを表示
Find the index of the largest 3 elements?
0 件のコメント
採用された回答
Walter Roberson
2014 年 3 月 20 日
"for" loop.
2 件のコメント
Walter Roberson
2014 年 3 月 20 日
for K = 1 : length(x)
if x(K) > 5
disp(K)
end
end
the above example does not try to find any maximums, it just shows how you can create a loop that examines values in the array and does something conditionally.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!