<?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 diagonal manipulation in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437528#M4004</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables as shown in the attachment. I want to create the result table, which is shown at the bottom of the attachment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the diagonal columns in table 1, i want to populate the values from table 2&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Challenge is in table 2 i got a product name column which got a value "A" as i appended it to a table.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Can someone give me a hand please? I really appreciate everyone who have been helping me so far.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 12:02:25 GMT</pubDate>
    <dc:creator>akpattnaik</dc:creator>
    <dc:date>2018-02-15T12:02:25Z</dc:date>
    <item>
      <title>Matrix diagonal manipulation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437528#M4004</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables as shown in the attachment. I want to create the result table, which is shown at the bottom of the attachment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the diagonal columns in table 1, i want to populate the values from table 2&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Challenge is in table 2 i got a product name column which got a value "A" as i appended it to a table.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Can someone give me a hand please? I really appreciate everyone who have been helping me so far.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 12:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437528#M4004</guid>
      <dc:creator>akpattnaik</dc:creator>
      <dc:date>2018-02-15T12:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix diagonal manipulation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437576#M4005</link>
      <description>&lt;P&gt;Is the DIAG function what you are looking for?&amp;nbsp;&amp;nbsp; It will convert any vector into a diagonal matrix.&amp;nbsp; For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
   a = diag({1 2 3});
   print a;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 13:47:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437576#M4005</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2018-02-15T13:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix diagonal manipulation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437579#M4006</link>
      <description>&lt;P&gt;Thanks for your reply. But i believe its something more to that. Can you please have a look at the data which is attached?&lt;/P&gt;&lt;P&gt;i want the values from a different table to be replaced with the diagonals. Appreciate your input and time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 13:55:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437579#M4006</guid>
      <dc:creator>akpattnaik</dc:creator>
      <dc:date>2018-02-15T13:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix diagonal manipulation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437582#M4007</link>
      <description>&lt;P&gt;I am not&amp;nbsp;understanding what you want,&amp;nbsp; so can you explain in more detail please?&amp;nbsp;&amp;nbsp; How do you want to make Table 2 from Table 1?&amp;nbsp;&amp;nbsp; The step after that is just the DIAG function, as the 2nd&amp;nbsp;"22" in the result matrix is a typo,&amp;nbsp; right?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 14:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437582#M4007</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2018-02-15T14:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix diagonal manipulation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437589#M4008</link>
      <description>&lt;P&gt;Ah, Sorry Ian. My bad. You are right.&lt;/P&gt;&lt;P&gt;I guess i'm not able to think straight now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Diag is the option.&amp;nbsp; i was wandering how to put that in the shape of table 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;N=nrow(table1);&lt;/P&gt;&lt;P&gt;test= diag(table2);&lt;/P&gt;&lt;P&gt;result=??&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 14:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Matrix-diagonal-manipulation/m-p/437589#M4008</guid>
      <dc:creator>akpattnaik</dc:creator>
      <dc:date>2018-02-15T14:18:59Z</dc:date>
    </item>
  </channel>
</rss>

