removing repeated values from an array
Afficher commentaires plus anciens
Suppose I have an array [1.2 8 89 1.2 4 8 32 1.2]. Is there any MATLAB function that gives me the array without repeated values: [1.2 8 89 4 32]?!
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 14 Sep 2013
Try this:
m = [1.2 8 89 1.2 4 8 32 1.2]
mu = unique(m, 'stable')
1 commentaire
Ibehma01
le 14 Sep 2013
Catégories
En savoir plus sur Shifting and Sorting Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!