MATLAB: Eliminate duplicate values in a row!

duplicateunique

>> A
A =
2 3 5 6 6 9 9 11 12 16
I want eliminate duplicate values in A so that A should be
>>A
A=
2 3 5 6 9 11 12 16
How to do this in single line?

Best Answer

unique(A)