<?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: SAS IML create matrix using {} with scalar arithmetic. in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532364#M4555</link>
    <description>&lt;P&gt;The reason it runs without error is that IML interprets { j , 4 } as a declaration of a character vector.&amp;nbsp; The easiest way to&amp;nbsp;get what you want is to use&amp;nbsp;a concatenation operator:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;theta = j // 4;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 03 Feb 2019 09:04:38 GMT</pubDate>
    <dc:creator>IanWakeling</dc:creator>
    <dc:date>2019-02-03T09:04:38Z</dc:date>
    <item>
      <title>SAS IML create matrix using {} with scalar arithmetic.</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532345#M4553</link>
      <description>&lt;P&gt;In IML, following code gives an error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
	i=5;
	theta={i*3,4};
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This code has no error. But it doesn't run as expected:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
	i=5;
	j=i*3;
	theta={j,4};
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What's the reason?&lt;/P&gt;&lt;P&gt;I want to create a column with elements {15,4}.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Feb 2019 05:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532345#M4553</guid>
      <dc:creator>kilasue</dc:creator>
      <dc:date>2019-02-03T05:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS IML create matrix using {} with scalar arithmetic.</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532356#M4554</link>
      <description>&lt;P&gt;No, I don't think the syntax is supported like that. Also, I think the second block of code is much prettier, so why not just go with that?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Feb 2019 07:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532356#M4554</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-03T07:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS IML create matrix using {} with scalar arithmetic.</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532364#M4555</link>
      <description>&lt;P&gt;The reason it runs without error is that IML interprets { j , 4 } as a declaration of a character vector.&amp;nbsp; The easiest way to&amp;nbsp;get what you want is to use&amp;nbsp;a concatenation operator:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;theta = j // 4;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Feb 2019 09:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532364#M4555</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2019-02-03T09:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS IML create matrix using {} with scalar arithmetic.</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532562#M4561</link>
      <description>&lt;P&gt;To expand on Ian's answer, see the article &lt;A href="https://blogs.sas.com/content/iml/2011/02/21/how-to-build-a-vector-from-expressions.html" target="_self"&gt;"How to build a vector from expressions."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 13:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/SAS-IML-create-matrix-using-with-scalar-arithmetic/m-p/532562#M4561</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-02-04T13:54:09Z</dc:date>
    </item>
  </channel>
</rss>

