<?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: subroutine in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/subroutine/m-p/141596#M1188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start AddToDiag( result, A, B);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* add B to diagonal of a square matrix A */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = A + diag(&amp;nbsp; j(nrow(A),&amp;nbsp; 1,&amp;nbsp;&amp;nbsp; B)&amp;nbsp; );&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* test it out */&lt;/P&gt;&lt;P&gt;m = {1 1 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 2 2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 3 3 };&lt;/P&gt;&lt;P&gt;lambda = 3;&lt;/P&gt;&lt;P&gt;run AddToDiag( MPlusLambda, m, lambda);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print M lambda MPlusLambda;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2014 12:21:29 GMT</pubDate>
    <dc:creator>Hutch_sas</dc:creator>
    <dc:date>2014-05-02T12:21:29Z</dc:date>
    <item>
      <title>subroutine</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/subroutine/m-p/141595#M1187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is an example of a subroutine module with 2 parameters, a constant and a square matrix.&lt;/P&gt;&lt;P&gt;that adds the constant value to every element of the diagonal of the matrix, and passes&amp;nbsp; the result&lt;/P&gt;&lt;P&gt;back in a new parameter? I'm having a hard time understanding this stuff so lots of comments would&lt;/P&gt;&lt;P&gt;be unbelievably helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 05:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/subroutine/m-p/141595#M1187</guid>
      <dc:creator>bri11</dc:creator>
      <dc:date>2014-05-02T05:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: subroutine</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/subroutine/m-p/141596#M1188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start AddToDiag( result, A, B);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* add B to diagonal of a square matrix A */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = A + diag(&amp;nbsp; j(nrow(A),&amp;nbsp; 1,&amp;nbsp;&amp;nbsp; B)&amp;nbsp; );&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* test it out */&lt;/P&gt;&lt;P&gt;m = {1 1 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 2 2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 3 3 };&lt;/P&gt;&lt;P&gt;lambda = 3;&lt;/P&gt;&lt;P&gt;run AddToDiag( MPlusLambda, m, lambda);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print M lambda MPlusLambda;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 12:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/subroutine/m-p/141596#M1188</guid>
      <dc:creator>Hutch_sas</dc:creator>
      <dc:date>2014-05-02T12:21:29Z</dc:date>
    </item>
  </channel>
</rss>

