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

MATLABremove repitions of vectors

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]

Best Answer

b(ismember(b,a)) = 0;