How to find the column indices of the latest row's minimum value?

조회 수: 1 (최근 30일)
bilgesu ak
bilgesu ak 2016년 2월 20일
댓글: bilgesu ak 2016년 2월 21일
Hi; I have matrix and I want to have the answer that which column has the last row's minimum value ?
For example my matrix is:
A=
[1 3 4;
3 4 5;
6 1 3];
My last row's minimum value is 1 and it is in second column. I want to have the answer of 2.
Thanks;
Regards...

채택된 답변

Walter Roberson
Walter Roberson 2016년 2월 20일
[~, idx] = min(A(end,:));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by