Is there a method in Julia similar to MATLAB’s unique
method? In Julia there is unique
, but it does not have the same functionality. Specifically, I would like to get the list of indices of unique elements.
julia> unique([9,2,9,5])
3-element Array{Int64,1}:
9
2
5
julia> indices = [1,2,4]
3-element Array{Int64,1}:
1
2
4
In Matlab, the unique
method provides the indices in the 2nd output argument, but Julia does not.
Is there any existing similar method? Unique values in array - MATLAB unique