回 帖 发 新 帖 刷新版面

主题:[讨论]matlab中求最小值

假定给定一序列,可以用matlab中的min函数求出该序列的中的最小值,但是不能得到该最小值所在的位置,除非用循环进行一个一个的判断。那么请问,matlab中有没有这样的一个函数,即可以求得该序列的最小值,又可以得到其所在的位置?谢谢

回复列表 (共1个回复)

沙发

[Y,I] = MIN(X) returns the indices of the minimum values in vector I.
    If the values along the first non-singleton dimension contain more
    than one minimal element, the index of the first one is returned.

我来回复

您尚未登录,请登录后再回复。点此登录或注册