removing repeated values from an array
Ältere Kommentare anzeigen
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]?!
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 14 Sep. 2013
Try this:
m = [1.2 8 89 1.2 4 8 32 1.2]
mu = unique(m, 'stable')
1 Kommentar
Ibehma01
am 14 Sep. 2013
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!