<?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 matrix multiplication inIML within a SAS macro in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56680#M339</link>
    <description>SAS uses the "*" for comments.&lt;BR /&gt;
IML uses the "*" for matrix multiplication.&lt;BR /&gt;
 &lt;BR /&gt;
How can I use matrix multiplication in SAS/IML?  It makes the text after the "*" purple indicating a comment???&lt;BR /&gt;
   -- Note: I am using Proc IML in a macro.  Shouldn't matter though as the "*" is for comments in macros, just as in base SAS.&lt;BR /&gt;
&lt;BR /&gt;
Please also email me directly your answers!!  (steveseoul@yahoo.com)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
 &lt;BR /&gt;
Steve</description>
    <pubDate>Wed, 28 Jul 2010 16:41:25 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-07-28T16:41:25Z</dc:date>
    <item>
      <title>matrix multiplication inIML within a SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56680#M339</link>
      <description>SAS uses the "*" for comments.&lt;BR /&gt;
IML uses the "*" for matrix multiplication.&lt;BR /&gt;
 &lt;BR /&gt;
How can I use matrix multiplication in SAS/IML?  It makes the text after the "*" purple indicating a comment???&lt;BR /&gt;
   -- Note: I am using Proc IML in a macro.  Shouldn't matter though as the "*" is for comments in macros, just as in base SAS.&lt;BR /&gt;
&lt;BR /&gt;
Please also email me directly your answers!!  (steveseoul@yahoo.com)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
 &lt;BR /&gt;
Steve</description>
      <pubDate>Wed, 28 Jul 2010 16:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56680#M339</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-28T16:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: matrix multiplication inIML within a SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56681#M340</link>
      <description>Steve,&lt;BR /&gt;
&lt;BR /&gt;
The "*" signals a comment only if it is the first character of a new source statement. In the context of a binary operation it is treated as a matrix multiplication operator :&lt;BR /&gt;
&lt;BR /&gt;
proc iml;&lt;BR /&gt;
a = 1;&lt;BR /&gt;
b = 1;&lt;BR /&gt;
* this is a comment;&lt;BR /&gt;
y = a * b; /* this is a matrix multiply operation */&lt;BR /&gt;
print y;</description>
      <pubDate>Wed, 28 Jul 2010 16:59:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56681#M340</guid>
      <dc:creator>Hutch_sas</dc:creator>
      <dc:date>2010-07-28T16:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: matrix multiplication inIML within a SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56682#M341</link>
      <description>You can use the "alternative commment" (asterisk ... semicolon) at the end of lines, like this:&lt;BR /&gt;
&lt;BR /&gt;
proc iml;&lt;BR /&gt;
A = {1 2, 3 4}; * matrix assignment statment;&lt;BR /&gt;
x = {5, 6};     * vector assignment statment;&lt;BR /&gt;
y = A*x;        * matrix multiplication;&lt;BR /&gt;
print y;&lt;BR /&gt;
&lt;BR /&gt;
As Hutch points out, they are also valid on separate lines. The matrix operator is in the middle of a statement, so the IML parser can distinguish that it is not a comment.&lt;BR /&gt;
&lt;BR /&gt;
It sounds like the color-coding shown in your editor is getting confused by the alternate comment syntax. Just ignore the color-coding, or use traditional slash-star comments (/* ... */).</description>
      <pubDate>Thu, 29 Jul 2010 13:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/matrix-multiplication-inIML-within-a-SAS-macro/m-p/56682#M341</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2010-07-29T13:03:15Z</dc:date>
    </item>
  </channel>
</rss>

