Unique numbers in array
Mostrar comentarios más antiguos
I was charged to try and write my own unique function , I was thinking of first sorting the array, and then writing a loop that went through each number from min(min) to max(max) but cant figure out once a repeated number is identified to skip it. Any thoughts?
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 23 de Abr. de 2014
Editada: Azzi Abdelmalek
el 23 de Abr. de 2014
out= unique(A)
Or
out=unique(A,'rows')
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!