removing equal elements from a matrix
    6 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hi all,
I have a matrix like "a" whose some elemnts are equal to each other. I wato to transform this matrix to a vector like "b" with non-equal elements.
e.g. a=[ 1 2 3 ; 3  4 5; 6 4 7];  >> b=[1 2 3 4 5 6 7];
How can I write this program? Thanks in advance.
0 commentaires
Réponse acceptée
  Azzi Abdelmalek
      
      
 le 26 Fév 2013
        
      Modifié(e) : Azzi Abdelmalek
      
      
 le 26 Fév 2013
  
      a=[ 1 2 3 ; 3  4 5; 6 4 7]; 
b=unique(a(:))'
2 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Language Fundamentals 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!