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

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

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!