Whhat is the best way to remove repitions of two or three vectors?

1 Ansicht (letzte 30 Tage)
suppose I have a=[9 10 6 3 7],b=[1 9 6 7 8], I want to remove the repartitions so that:a=[9 10 6 3 7],b=[1 0 0 0 8]

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Apr. 2014
b(ismember(b,a)) = 0;

Weitere Antworten (0)

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by