Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: mantain rows on matrix(ismember(matrix,vector))
Replies: 2   Last Post: Jul 6, 2013 8:31 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 382
Registered: 1/12/09
Re: mantain rows on matrix(ismember(matrix,vector))
Posted: Jul 6, 2013 1:19 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Fagota,

How about the following?

c = a;
M = ~ismember(a,b);
c(M) = cell(sum(M(:)),1)


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.