Using a for loop to find max value for each row in matrix

조회 수: 3 (최근 30일)
James Robert Fletcher
James Robert Fletcher 2020년 6월 23일
댓글: Matt J 2020년 6월 24일
Hello, I have a 1001x251 matrix named Power and am trying to find the maximum value of each row of the matrix. Any help would be appreciated!

채택된 답변

Matt J
Matt J 2020년 6월 23일
편집: Matt J 2020년 6월 23일
Just use max()
>> A=rand(1001,251 );
>> rowmax=max(A,[],2);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by