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

for loop

Hello, I have a 1001×251 matrix named Power and am trying to find the maximum value of each row of the matrix. Any help would be appreciated!

Best Answer

Just use max()
>> A=rand(1001,251 );
>> rowmax=max(A,[],2);