In Matlab, by the function min(), I can only get one single minimum element of a vector, even if there can be several equal minimum elements. I was wondering how to get the indi
v = [1 2 3 1 5]; find( v == min(v) ) ans = 1 4
At least in Octave (don't have matlab), this returns the indexes of all minimums in v
You can use find to find the min values:
find
find(v == min(v))