remove equal items without loop
Mostrar comentarios más antiguos
hi, I want to remove any two item are equal without loop x=[1 2 3 5]; y=[4 3 1 6 7]; I want the result be x=[2 5] y=[4 6 7] how do that? thanks
Respuesta aceptada
Más respuestas (1)
Andrei Bobrov
el 28 de Mzo. de 2012
x = setdiff(x,y)
y = setdiff(y,x)
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!