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,:));
  1 件のコメント
bilgesu ak
bilgesu ak 2016 年 2 月 21 日
thank you Roberson; it works...
Regards...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by