<?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: Create matrix from upper/lower triangles in IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158887#M1466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help, Rick!&amp;nbsp; Since I do have an older version of SAS, I was able to use your prior post to create the ROW and COL processes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2014 13:52:25 GMT</pubDate>
    <dc:creator>amyg</dc:creator>
    <dc:date>2014-03-28T13:52:25Z</dc:date>
    <item>
      <title>Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158881#M1460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have two matrices in proc iml that I created from two different SAS data sets.&amp;nbsp; Let's call them a and b.&amp;nbsp; I want to create a third matrix (c) by taking the upper-right triangle from matrix a and the lower-left triangle from matrix b.&amp;nbsp; All of the values in the matrices are numeric.&amp;nbsp; I tried using a do loop but was unsuccessful.&amp;nbsp; My matrices are quite large (167x167).&amp;nbsp; Any ideas?&amp;nbsp; This was the code that I tried that did not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;use&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; data1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;read&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; all &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; a;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;use&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; data2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;read&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; all &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;c=j(167&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;167&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; i=&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;167&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; j=i+&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;167&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; c;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 19:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158881#M1460</guid>
      <dc:creator>amyg</dc:creator>
      <dc:date>2014-03-27T19:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158882#M1461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS/IML 12.3 introduced the ROW and COL functions.&amp;nbsp; To see how they work (and to get code for them if you have an earlier release) see &lt;A href="http://blogs.sas.com/content/iml/2012/09/17/filling-the-lower-and-upper-triangular-portions-of-a-matrix/" title="http://blogs.sas.com/content/iml/2012/09/17/filling-the-lower-and-upper-triangular-portions-of-a-matrix/"&gt; Filling the lower and upper triangular portions of a matrix - The DO Loop&lt;/A&gt; By using these functions, it is easy to extract and set the upper or lower triangular portions of a matrix:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;upperIdx = loc( col(a) &amp;gt; row(a) );&lt;/P&gt;&lt;P&gt;lowerIdx = loc( col(b) &amp;lt; row(b) );&lt;/P&gt;&lt;P&gt;c[upperIdx] = a[upperIdx];&lt;/P&gt;&lt;P&gt;c[lowerIdx] = b[lowerIdx];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158882#M1461</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-27T20:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158883#M1462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not complaining to you, Rick, I'm complaining to SAS, and I want to point out how much I hate SAS's numbering system.&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;SAS/IML 12.3 introduced the ROW and COL functions.&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;I know I have SAS 9.4. I'm 100% certain. I can even look up that it is TS1M0. However, I have no idea if I have SAS/IML 12.3 or SAS/STAT 16.4 or any of the other sub-numberings of SAS sub-products that appear to exist, and furthermore I don't even know where to look this up. Nor do I feel that I should have to remember or even be aware of these sub-version numbers, I wish everyone would talk in terms of SAS 9.4 TS1M0 or SAS 9.3 TS1M1 and then things would be crystal clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, with regards to your specific contribution about the ROW and COL functions, when I look in SAS help (which I get to by pressing F1 from within SAS), I do not see a ROW function or a COL function. I guess this means I do not have SAS/IML 12.3 (does it really mean that? should I now have SAS/IML 12.3? who would know?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:21:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158883#M1462</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-03-27T20:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158884#M1463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I share your frustrations, which is why I looked up the releases and wrote a blog post that connects the Base release to the analytical products:&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2013/08/02/how-old-is-your-version-of-sas-release-dates-for-sas-software/" title="http://blogs.sas.com/content/iml/2013/08/02/how-old-is-your-version-of-sas-release-dates-for-sas-software/"&gt;&amp;nbsp; How old is your version of SAS? Release dates for SAS software - The DO Loop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;That post is only 6 months old and has received more than 15,000 views, so I know that we are not alone in wanting to connect the two versioning systems&amp;nbsp; Bookmark it (I have).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PC SAS, when I launch SAS the Log says which version of analytical products I have.&amp;nbsp; I think that information does not appear in EG and other interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the record, SAS 9.4TS1M0 corresponds to release 12.1 of the analytical products.&lt;/P&gt;&lt;P&gt;Of course, you can determine your SAS release by submitting&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;%put SYSVLONG = &amp;amp;SYSVLONG;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:36:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158884#M1463</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-27T20:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158885#M1464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;For the record, SAS 9.4TS1M0 corresponds to release 12.1 of the analytical products.&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the blog post you linked to, SAS 9.4TS1M0 corresponds to 12.3, which I obviously don't have if the SAS DOCs don't have the ROW and COL functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158885#M1464</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-03-27T20:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158886#M1465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See how confusing it is?&amp;nbsp; I tried to rely on memory instead of looking it up, and I got it wrong!&amp;nbsp; My apologies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you have 12.3, which was a minor maintenance release for the analytical products. The SAS/IML doc was not revised for that minor release because 13.1 followed 5 months later. You can view "What's New in SAS/IML 12.3" as part of the "What's New in 13.1" doc: &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/66845/HTML/default/viewer.htm#imlug_whatsnew9_sect014.htm" title="http://support.sas.com/documentation/cdl/en/imlug/66845/HTML/default/viewer.htm#imlug_whatsnew9_sect014.htm"&gt;SAS/IML(R) 13.1 User's Guide&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 20:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158886#M1465</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-27T20:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create matrix from upper/lower triangles in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158887#M1466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help, Rick!&amp;nbsp; Since I do have an older version of SAS, I was able to use your prior post to create the ROW and COL processes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 13:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Create-matrix-from-upper-lower-triangles-in-IML/m-p/158887#M1466</guid>
      <dc:creator>amyg</dc:creator>
      <dc:date>2014-03-28T13:52:25Z</dc:date>
    </item>
  </channel>
</rss>

