Hi, I have the same problem but with median function.
So my question is how to get index number of median element (if it exists) in vector/array. (without using for loop)
[val,index]=median(x)
displays error: to many output arguments
It seems that this works only with max/min