<?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: Convert Matlab Code to IML List Matrix in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/655422#M5142</link>
    <description>&lt;P&gt;Thank you so much. This is exactly what I need and I did not know the IML coding that you sent. Again, many thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jun 2020 09:38:39 GMT</pubDate>
    <dc:creator>Sanscrit_2prov</dc:creator>
    <dc:date>2020-06-09T09:38:39Z</dc:date>
    <item>
      <title>Convert Matlab Code to IML List Matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654691#M5138</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;I'm trying to convert the following matlab code to sas iml.&lt;/P&gt;
&lt;P&gt;do=1 to maxzeros;&lt;/P&gt;
&lt;P&gt;matrixname[i]=0:(2^-i)-1;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;matrixname is a cell matrix, which corresponds to a list matrix in SAS IML.&amp;nbsp; &amp;nbsp;The operator ^ raises 2 to a power.&lt;/P&gt;
&lt;P&gt;So let's say the index (i)=3. Then this code creates a matrix cell with 8 values 0,1,2,3,4,5,6,7.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've written the following in IML so far:&lt;/P&gt;
&lt;P&gt;nz2enum=listcreate(maxnonzeros);&lt;BR /&gt;do i=1 to maxnonzeros;&lt;BR /&gt;max=(2 ## i);&lt;BR /&gt;do k=1 to max;&lt;BR /&gt;val=k-1;&lt;BR /&gt;call ListSetItem (nz2enum,i,{val});&amp;nbsp; &amp;nbsp; This inserts the word val. How to get it to insert the number val?&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run listprint (nz2enum);&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 21:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654691#M5138</guid>
      <dc:creator>Sanscrit_2prov</dc:creator>
      <dc:date>2020-06-08T21:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matlab Code to IML List Matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654693#M5139</link>
      <description>&lt;P&gt;please replace &lt;STRONG&gt;{val}&lt;/STRONG&gt; with &lt;STRONG&gt;val&lt;/STRONG&gt;. Your ListSetItem call should look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call ListSetItem (nz2enum,i,val);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 22:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654693#M5139</guid>
      <dc:creator>ardehg</dc:creator>
      <dc:date>2020-06-08T22:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matlab Code to IML List Matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654714#M5140</link>
      <description>&lt;P&gt;Thank you now that works. The only problem is I need a way to place val is separate columns of the list. Is there a form of the list set item command where you can reference the individual cells in the list?&amp;nbsp; That is, I want to place 0,1,2,3,4,5,6,7 as separate columns in the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 01:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654714#M5140</guid>
      <dc:creator>Sanscrit_2prov</dc:creator>
      <dc:date>2020-06-09T01:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matlab Code to IML List Matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654742#M5141</link>
      <description>&lt;P&gt;If I understand your question correctly (and based on looking at your Matlab code) you may be looking for the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
maxnonzeros = 3;
nz2enum=listcreate(maxnonzeros);
do i=1 to maxnonzeros;
  val = 0:(2##i-1);
  call ListSetItem (nz2enum,i,val);
  print (nz2enum$i);
end;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please let me know if I still don't understand your question.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 01:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/654742#M5141</guid>
      <dc:creator>ardehg</dc:creator>
      <dc:date>2020-06-09T01:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matlab Code to IML List Matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/655422#M5142</link>
      <description>&lt;P&gt;Thank you so much. This is exactly what I need and I did not know the IML coding that you sent. Again, many thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 09:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Convert-Matlab-Code-to-IML-List-Matrix/m-p/655422#M5142</guid>
      <dc:creator>Sanscrit_2prov</dc:creator>
      <dc:date>2020-06-09T09:38:39Z</dc:date>
    </item>
  </channel>
</rss>

