How can I delete two or more elements in a vector?
    2 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
For example,
A = [1 1 2 3 10 7 10 1 5 3]
two or more elements in A is 1, 3, 10.
delet two or more elements in A
->  A = [2 5 7]
How can I edit it?
0 Commenti
Risposta accettata
  Stephen23
      
      
 il 11 Gen 2020
        >> A = [1,1,2,3,10,7,10,1,5,3];
>> U = unique(A);
>> Z = U(histc(A,U)==1)
Z =
   2   5   7
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Language Fundamentals in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

