MATLAB: Comparing elements of two matrices

matlab element comparison

Hello Everyone, I have 2 matrices with dimensions A = 707*1 and B= 404*1, where B is a subset of A. I would like to compare the two matrices, and delete the common elements of A and B and create a 3rd matrix with unique elements of A. Could someone help me in this regard?
Thanks

Best Answer

Afiltered = setdiff(A, B)