: 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.
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.