MATLAB Answers

C Zeng

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}




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')

Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!