Find maximum value of each row in a double matrix

5 Ansichten (letzte 30 Tage)
Ivan Mich
Ivan Mich am 21 Feb. 2021
Bearbeitet: KALYAN ACHARJYA am 21 Feb. 2021
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?

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 21 Feb. 2021
Bearbeitet: KALYAN ACHARJYA am 21 Feb. 2021
"I would like to find the maximum value of each row in this matrix"
max_row=max(matrix')
%............Note on transpose

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by