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

3 views (last 30 days)
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!

Accepted Answer

Matt J
Matt J on 23 Jun 2020
Edited: Matt J on 23 Jun 2020
Just use max()
>> A=rand(1001,251 );
>> rowmax=max(A,[],2);

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!