How to find out the minimum value in a matrix between two columns in a row

조회 수: 3 (최근 30일)
suppose i have matrix a=[1 2 3 4 5 10;2 3 5 6 1 12;2 6 4 5 7 16;10 2 1 4 5 20;2 3 1 4 9 12]
now i want to find out the miimum value between column 3 and 4 of row 1, what will be mind command for that?

채택된 답변

Adam Danz
Adam Danz 2022년 1월 13일
Learn indexing. 10 minutes reading that page will save you hours in the future.
min(a(1,[3,4]))

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by