Find index of maximum value of array

You could use findfirst(x -> x == maximum(X), X) or findfirst(==(maximum(X)), X), but the easiest thing to do is argmax(X).

11 Likes