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!