Effacer les filtres
Effacer les filtres

how to extract different values/elements of matrix or vector without repeating?

6 vues (au cours des 30 derniers jours)
Hello,
I have a vector/ or it could be array : A = [1,2,3,4,5,1,2,3,4,5,1,2,3] I want to extract existing different values/elements from this vector without repeating: 1,2,3,4,5 B= [1,2,3,4,5]
How can I extract it ?
I would appreciate for any help please

Réponse acceptée

Stephen23
Stephen23 le 8 Fév 2017
>> A = [1,2,3,4,5,1,2,3,4,5,1,2,3];
>> unique(A)
ans =
1 2 3 4 5

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by