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 indices of all minimum elements in a vector?
For example,
v=[1,1];
I would like to get the indices 1 and 2, both of which index the smallest elements 1.
Thanks and regards!
You can use
findto find the min values: