Selecting maximum values from every column in a matrix

조회 수: 3 (최근 30일)
Alexander
Alexander 2013년 3월 11일
댓글: Eren Atar 2022년 6월 14일
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

채택된 답변

Vishal Rane
Vishal Rane 2013년 3월 11일
편집: Vishal Rane 2013년 3월 11일
Assuming
a = [11 2 3; 4 52 6; 7 8 92];
max(a)
gives exactly what you need.
Refer max()
  댓글 수: 1
Eren Atar
Eren Atar 2022년 6월 14일
A = rand(24*60*60,1);
B = reshape(A,[],1440) ;
iwant = max(B)
Thank you this should do it

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by