MATLAB: Sort without duplicate sortsort without duplicate Hi, I want to sort a vector leaving only unique values. For example, if I have: 1 2 2 3 4 4 5 I want to get 1 2 3 4 5 Could anybody help me to solve this? Best Answer doc uniqueThe unique function find unique elements of vector Related SolutionsMATLAB: How to arrenge the calculated distances in ascending order The sort command can sort in ascending and descending order. See "help sort". MATLAB: How to sort the elements of an array within a given range a=[2 5 1 3 4];a(2:4) = sort(a(2:4)) Related QuestionSortingSortrowsHow to sort an array in descending order
Best Answer