When I execute the following code in MATLAB
x = [5 4 4 6 1];unique(x)
I observe the following output
ans = 1 4 5 6
However, I would like to eliminate duplicate values without sorting values by ascending values.
increasinglistMATLABorderorderedre-arrangerearrangeremovesortunsort
x = [5 4 4 6 1];unique(x)
ans = 1 4 5 6
Best Answer