Sort without duplicate

64 views (last 30 days)
Ieva
Ieva on 16 Mar 2012
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?

Accepted Answer

Aurelien Queffurust
Aurelien Queffurust on 16 Mar 2012
doc unique
The unique function find unique elements of vector
  1 Comment
Ieva
Ieva on 16 Mar 2012
Great, thank you for help! :)

Sign in to comment.

More Answers (0)

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!