How to remove repeat entities in a matlab array

1 view (last 30 days)
I have an array with 17 values within it, I have only one number than appears twice, i want the new identity to have 16 values in it, only including this perticular repeat value only once in the new identity

Answers (1)

James Tursa
James Tursa on 10 Nov 2020
Edited: James Tursa on 10 Nov 2020
unique(your_variable)
or
unique(your_variable,'stable')
  9 Comments
James Tursa
James Tursa on 11 Nov 2020
@Stephen: Good catch! I totally missed that.

Sign in to comment.

Categories

Find more on Particle & Nuclear Physics 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!