Does Julia have a build team to find the minimum index of a vector? R, for example, has a command which.min(and which.max, of course).
Obviously, I could write the following myself, but it would be nice not to do this.
function whichmin( x::Vector )
i = 1
min_x=minimum(x)
while( x[i] > min_x )
i+=1
end
return i
end
Sorry if this was asked before, but I could not find it. Thank!
source
share