Find maximum value of each row in a double matrix
조회 수: 5 (최근 30일)
이전 댓글 표시
I have a matrix A double with columns and rows. All the data of A are numbers. I would like to find the maximum value of each row in this matrix.
I tried:
for i=length(A)
MAXIMUMO(i)=max(A(i,:))
end
But it keep onle the last row maximum, whereas the rest data are zero.
Could you please help me?
댓글 수: 0
채택된 답변
KALYAN ACHARJYA
2021년 2월 21일
편집: KALYAN ACHARJYA
2021년 2월 21일
"I would like to find the maximum value of each row in this matrix"
max_row=max(matrix')
%............Note on transpose
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 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!