Selecting maximum values from every column in a matrix

1 view (last 30 days)
Hi,
I have a matrix of values and would like to select the highest value in every column and save it into a 1D array. Any help would be appreciated.
Cheers,
Alex

Accepted Answer

Vishal Rane
Vishal Rane on 11 Mar 2013
Edited: Vishal Rane on 11 Mar 2013
Assuming
a = [11 2 3; 4 52 6; 7 8 92];
max(a)
gives exactly what you need.
Refer max()
  1 Comment
Eren Atar
Eren Atar on 14 Jun 2022
A = rand(24*60*60,1);
B = reshape(A,[],1440) ;
iwant = max(B)
Thank you this should do it

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!