Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

about Find difference set.

Asked by C Zeng on 8 Jan 2013

Hi, I have two matrices(same number of columns), M1 and M2. M2 is a set of subset of rows in M1. Is there a function in matlab that I can directly get M1-M2={set of rows in M1 but not set of rows in M2}

Thanks.

0 Comments

C Zeng

Products

No products are associated with this question.

1 Answer

Answer by Sean de Wolski on 8 Jan 2013
Accepted answer
doc setxor

Use the 'rows' flag.

1 Comment

C Zeng on 8 Jan 2013

Thanks, Sean. setxor(A,B,'rows')

Sean de Wolski

Contact us