开发者

How do I get the index of the smallest element in an array in matlab?

How do I g开发者_JAVA百科et the index of the smallest element in an array in matlab?


[C,I] = min(...) finds the indices of the minimum values of A, and returns them in output vector I. If there are several identical minimum values, the index of the first one found is returned.


Use the min() function with 2 output arguments. The first returned value will be the value, the second will be the index of that value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜