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

2 ビュー (過去 30 日間)
bkshn
bkshn 2014 年 11 月 6 日
編集済み: Orion 2014 年 11 月 6 日
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);

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by