matlab - How to find all minimum elements in a vector -
in matlab, function min(), can 1 single minimum element of vector, if there can several equal minimum elements. wondering how indices of minimum elements in vector?
for example,
v=[1,1];
i indices 1 , 2, both of index smallest elements 1.
thanks , regards!
you can use find
find min values:
find(v == min(v))
Comments
Post a Comment