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

Is this function available?

LeanMan82LeanMan82 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

  • bdizzle329bdizzle329 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.