If I got a m x 1 matrix and I perform this little piece of code in Matlab it returns two arrays 'y' and 'i', where 'y' holds the unique numbers en 'i' holds the row numbers of the unique numbers? I don't understand why this is. Can someone explain this to me?

# MATLAB: What does the ‘i’ mean in [y,i] = unique(A)

MATLABmatrixvector index

###### Related Question

- Do I get “Subscript indices must either be real positive integers or logicals.”?
- PLEASE HELP ME find coresponding column indexes.
- Marker Symbol ‘I’ in plot
- Cell-Matrix, I can’t extract values
- Matlab Symbolic output ‘I’ – what does it denote
- Could anyone explain the lefthand side of [~,si] = sort(sums);
- Split 3d array into ‘i’ equal mat files

## Best Answer