MATLAB: How to use Uniquetol without sorting

uniquetol

Hello everyone,
I'm using the function "Uniquetol" to remove the duplicate vector from a matrix A which the size is (3, 10).
B = ( uniquetol(A', 1e-6, 'ByRows', 1) )';
It works very well, but it is also sorting my matrix which what I don't want
Please, can anyone tell how can we use the function "Uniquetol" without sorting ?

Best Answer

[~, colindices] = uniquetol(A', 1e-6, 'ByRows', true); %get indices of unique value. Is sorted BY VALUE
B = A(:, sort(colindices)) %Use the indices sorted BY INDEX instead