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

1 vue (au cours des 30 derniers jours)
bilgesu ak
bilgesu ak le 20 Fév 2016
Commenté : bilgesu ak le 21 Fév 2016
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...

Réponse acceptée

Walter Roberson
Walter Roberson le 20 Fév 2016
[~, idx] = min(A(end,:));

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by