Is this function available? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Is this function available?

Posts: 1Member
Hey Guys,

Quick Question.
I just want to know whether matlab has a function that can create a matrix which is an intersection of column spaces of two original matrices. Such that:

A has 5 column vectors, B has 3 column vectors. A and B share at least two column vectors and therefore creates a matrix C with these two column vectors.

Thanks.

Comments

• Posts: 1Member
: Hey Guys,
:
: Quick Question.
: I just want to know whether matlab has a function that can create a
: matrix which is an intersection of column spaces of two original
: matrices. Such that:
:
: A has 5 column vectors, B has 3 column vectors. A and B share at
: least two column vectors and therefore creates a matrix C with these
: two column vectors.
:
: Thanks.
:

The function intersect(A,B,'rows') works based on what you wanted.
The only thing you need to do is invert A, B, and, the output of
intersect(). So it should look like this -> intersect(A',B','rows')'
-> this returns a matrix with columns that are in both A and B.
Sign In or Register to comment.