<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Division of matrices of different sizes in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Division-of-matrices-of-different-sizes/m-p/130581#M1019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let B1 = 1/B.&amp;nbsp; Then what you are describing is a "direct product" that involves A and B1.&lt;/P&gt;&lt;P&gt;SAS/IML has two direct products: the "full" direct product is &lt;A href="mailto:P=A@B"&gt;P=A@B&lt;/A&gt;.&amp;nbsp; Your example is the first and last column of that direct product.&lt;/P&gt;&lt;P&gt;The second direct product is computed by using the &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect176.htm"&gt;HDIR function&lt;/A&gt;.&amp;nbsp; What you want is the transpose of HDIR(A`, B1`).&lt;/P&gt;&lt;P&gt;If this is something you intend to use often, you might want to use the following helper function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start VDIR(A,B);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return( T(hdir(A`,1/B`)) );&lt;BR /&gt;finish;&lt;/P&gt;&lt;P&gt;C = VDIR(A,B);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 May 2013 17:56:56 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2013-05-06T17:56:56Z</dc:date>
    <item>
      <title>Division of matrices of different sizes</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Division-of-matrices-of-different-sizes/m-p/130580#M1018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;I am attempting to divide the values in rows of matrix A by the values in rows of matrix B. the columns of both are the same variables, the rows are different though and the number of rows are different.&lt;/P&gt;&lt;P&gt; I have create a scaled down version below of what I am trying to do:&lt;/P&gt;&lt;P&gt;A{ 1 3, 4 5}&lt;/P&gt;&lt;P&gt;B{ 5 9, 6 2, 7 1}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C{ .2 .33, .166 1.5, .14 3,&lt;/P&gt;&lt;P&gt;.8 .55, .66 2.5, .57 5}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply using C=A/B doesn't work, But I am wondering what does? Or if I need to use something other than IML?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 17:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Division-of-matrices-of-different-sizes/m-p/130580#M1018</guid>
      <dc:creator>ahappel</dc:creator>
      <dc:date>2013-05-06T17:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Division of matrices of different sizes</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Division-of-matrices-of-different-sizes/m-p/130581#M1019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let B1 = 1/B.&amp;nbsp; Then what you are describing is a "direct product" that involves A and B1.&lt;/P&gt;&lt;P&gt;SAS/IML has two direct products: the "full" direct product is &lt;A href="mailto:P=A@B"&gt;P=A@B&lt;/A&gt;.&amp;nbsp; Your example is the first and last column of that direct product.&lt;/P&gt;&lt;P&gt;The second direct product is computed by using the &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect176.htm"&gt;HDIR function&lt;/A&gt;.&amp;nbsp; What you want is the transpose of HDIR(A`, B1`).&lt;/P&gt;&lt;P&gt;If this is something you intend to use often, you might want to use the following helper function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start VDIR(A,B);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return( T(hdir(A`,1/B`)) );&lt;BR /&gt;finish;&lt;/P&gt;&lt;P&gt;C = VDIR(A,B);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 17:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Division-of-matrices-of-different-sizes/m-p/130581#M1019</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-05-06T17:56:56Z</dc:date>
    </item>
  </channel>
</rss>

