Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Is this function available?
Date: Sat, 6 Dec 2008 22:13:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <ghetde$km4$1@fred.mathworks.com>
References: <852406.1228600170649.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228601582 21188 172.30.248.37 (6 Dec 2008 22:13:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 6 Dec 2008 22:13:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:505403

LeanMean82 <nndhawan@ufl.edu> wrote in message <852406.1228600170649.JavaMail.jakarta@nitrogen.mathforum.org>...
> 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.

  Yes.  Use the 'intersect' function with the 'rows' option.  (You'll have to do some transposing to make it work.)

Roger Stafford