How to find the maximum number in each row in a variable.
조회 수: 2 (최근 30일)
이전 댓글 표시
Lets say I have the following matrix:
1 2 3 4 5
2 3 3 3 3
2 2 2 2 5
how should I use max to get the larget number per row?
댓글 수: 0
채택된 답변
Walter Roberson
2013년 1월 24일
max(YourArray, [], 2)
댓글 수: 2
Bethelhem Biru
2020년 12월 10일
this will sisplay as a column matrix, if you want it to display as a row matrix, use the ' sign, for transposition. :)
추가 답변 (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!