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

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

답변 (1개)

Orion
Orion 2014년 11월 6일
편집: Orion 2014년 11월 6일
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);

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2014년 11월 6일

편집:

2014년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by