<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240575</link>
    <title>MATLAB Central Newsreader - Is this function available?</title>
    <description>Feed for thread: Is this function available?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 06 Dec 2008 21:49:00 -0500</pubDate>
      <title>Is this function available?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240575#615471</link>
      <author>LeanMean82</author>
      <description>Hey Guys,&lt;br&gt;
&lt;br&gt;
Quick Question.&lt;br&gt;
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:&lt;br&gt;
&lt;br&gt;
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.  &lt;br&gt;
&lt;br&gt;
Thanks.</description>
    </item>
    <item>
      <pubDate>Sat, 06 Dec 2008 22:13:02 -0500</pubDate>
      <title>Re: Is this function available?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240575#615473</link>
      <author>Roger Stafford</author>
      <description>LeanMean82 &amp;lt;nndhawan@ufl.edu&amp;gt; wrote in message &amp;lt;852406.1228600170649.JavaMail.jakarta@nitrogen.mathforum.org&amp;gt;...&lt;br&gt;
&amp;gt; Hey Guys,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Quick Question.&lt;br&gt;
&amp;gt; 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:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 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.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Yes.  Use the 'intersect' function with the 'rows' option.  (You'll have to do some transposing to make it work.)&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Sat, 06 Dec 2008 23:03:02 -0500</pubDate>
      <title>Re: Is this function available?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240575#615478</link>
      <author>David Doria</author>
      <description>Roger, I feel like he is talking more about the intersection of the column spaces, not a discrete kind of intersection. Intersect() will just say that two things intersect if they are exactly the same, right? Where the vector spaces intersect in a much more complicated way.&lt;br&gt;
&lt;br&gt;
I could be way off...&lt;br&gt;
&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 00:35:03 -0500</pubDate>
      <title>Re: Is this function available?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240575#615487</link>
      <author>Roger Stafford</author>
      <description>&quot;David Doria&quot; &amp;lt;daviddoria@gmail.com&amp;gt; wrote in message &amp;lt;ghf0b6$l55$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Roger, I feel like he is talking more about the intersection of the column spaces, not a discrete kind of intersection. Intersect() will just say that two things intersect if they are exactly the same, right? Where the vector spaces intersect in a much more complicated way.&lt;br&gt;
&amp;gt; I could be way off...&lt;br&gt;
&amp;gt; Dave&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Here is a quote from the Matlab 7 Function Reference, Vol. 2: &quot;c = intersect(A, B, 'rows') when A and B are matrices with the same number of columns returns the rows common to both A and B.&quot;  With a transpose understood, you can read that with the words 'rows' and 'columns' interchanged.  Nothing is said about the matrices being the same size, only their respective numbers of columns (which translates to rows with the transpose).&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;For example, if&lt;br&gt;
&lt;br&gt;
&amp;nbsp;A = [1 2 3 4 5;6 7 8 9 10;11 12 13 14 15] &lt;br&gt;
&lt;br&gt;
and&lt;br&gt;
&lt;br&gt;
&amp;nbsp;B = [5 16 2;10 17 7;15 18 12] &lt;br&gt;
&lt;br&gt;
then C could be calculated as&lt;br&gt;
&lt;br&gt;
&amp;nbsp;C = intersect(A',B','rows')' = [2 5;7 10;12 15].&lt;br&gt;
&lt;br&gt;
I presume from the OP's description, since A and B share two columns in common, that C should consist of just these two columns.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 02:47:01 -0500</pubDate>
      <title>Re: Is this function available?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240575#615494</link>
      <author>John D'Errico</author>
      <description>&quot;David Doria&quot; &amp;lt;daviddoria@gmail.com&amp;gt; wrote in message &amp;lt;ghf0b6$l55$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Roger, I feel like he is talking more about the intersection of the column spaces, not a discrete kind of intersection. Intersect() will just say that two things intersect if they are exactly the same, right? Where the vector spaces intersect in a much more complicated way.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I could be way off...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Dave&lt;br&gt;
&lt;br&gt;
I'd guess that Roger is correct here. The original&lt;br&gt;
question uses the phrase &quot;column space&quot;, but&lt;br&gt;
then gives an example that is not consistent with&lt;br&gt;
the linear algebraic definition of a column space.&lt;br&gt;
Intersect does what was described.&lt;br&gt;
&lt;br&gt;
John</description>
    </item>
  </channel>
</rss>

