Selecting value from matrix

조회 수: 1 (최근 30일)
Euan
Euan 2011년 11월 24일
I have a matrix as in the one below
C = 1 3 5 7
4 6 8 1
5 6 9 2
Each column has 3 values. I would like to find the maximum value from each column so
5 6 9 7
Then find the minimum of these, 5
So far the best way I have found is D=max(C) which returns D=5 6 9 7 then find min(D) which returns the value I would like, 5. Is there an easier way to do this?
Thanks
  댓글 수: 2
Titus Edelhofer
Titus Edelhofer 2011년 11월 24일
Apart from that you can combine into one call min(max(C)) I guess it can't be much easier then this ...
Euan
Euan 2011년 11월 24일
That's an improvement. Thank you

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by