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: Intersect two matrix
Replies: 3   Last Post: Jun 14, 2013 7:54 AM

Advanced Search

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

Posts: 31
Registered: 5/29/13
Re: Intersect two matrix
Posted: Jun 14, 2013 7:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <kpetic$m4o$1@speranza.aioe.org>...
> On 6/14/2013 5:38 AM, Abel wrote:
> > Hello,
> >
> > I would like to intersect two matrix. Let's say :
> >
> > A=
> >
> > 1 2 3
> > 1 4 5
> > 1 3 8
> >
> > B=
> >
> > 1 2 6
> > 1 4 7
> > 1 3 9
> >
> > Then the result would be :
> >
> > C=
> >
> > 1 2 1 4
> > 1 3
> >
> > How could I do this ? Moreover, let's suppose A, B doesn't necessarly
> > have the same dimension.

>
> A)

> >> A(:,all(ismember(A,B)))
> ans =
> 1 2
> 1 4
> 1 3

> >>
>
> B) Well, is ityou expect for non-commensurate elements? The crystal orb
> is murky this morning.
>
> --


Okay thank you very much for A). Then what do you mean in B) ? Is that impossible ?



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

[Privacy Policy] [Terms of Use]

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