How can I find column number of a specific element in matrix?

3 vues (au cours des 30 derniers jours)
bkshn
bkshn le 6 Nov 2014
Modifié(e) : Orion le 6 Nov 2014
I want to compare three element in a matrix and find minimum between them. then I want to know the column number of minimum element.
Could you help me how can I do it?
thanks

Réponses (1)

Orion
Orion le 6 Nov 2014
Modifié(e) : Orion le 6 Nov 2014
I guess you meant three element in a vector (you can make the same operation on a matrix)
ex :
vec = [5 3 9];
[MinValue, MinPosition] = min(vec);

Catégories

En savoir plus sur Programming 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