<?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: Delete &amp;quot;zero columns&amp;quot; in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164263#M1584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rick!&lt;/P&gt;&lt;P&gt;But No, my matrix contains positive and negative number in their columns.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;C={5 6 0 0 0,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -5 0 0 -8 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 7 0}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;How do you recommend do solve that ?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Orit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2014 12:57:06 GMT</pubDate>
    <dc:creator>oriti</dc:creator>
    <dc:date>2014-04-02T12:57:06Z</dc:date>
    <item>
      <title>Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164261#M1582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I would like to find an efficient way do delete zero column.&lt;/P&gt;&lt;P&gt;(part of my simulation results are matrix with zero columns &lt;/P&gt;&lt;P&gt;so I can't invert the matrix and it ends with empty value).&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C={1 1 0 0 0,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0 0 1 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0 0 1 0}&lt;/P&gt;&lt;P&gt;I want to get:&lt;/P&gt;&lt;P&gt;D={&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;1 1 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 0 1}&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Orit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 11:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164261#M1582</guid>
      <dc:creator>oriti</dc:creator>
      <dc:date>2014-04-02T11:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164262#M1583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your matrix elements always binary 0/1?&amp;nbsp; If so, just sum down the columns and keep the colums that sum to any positive value:&lt;/P&gt;&lt;P&gt;cols = loc(C[+, ]&amp;gt;0);&lt;/P&gt;&lt;P&gt;if ncol(cols)&amp;gt;0 then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; D = C[,cols];&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; D = C;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 12:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164262#M1583</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-04-02T12:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164263#M1584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rick!&lt;/P&gt;&lt;P&gt;But No, my matrix contains positive and negative number in their columns.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;C={5 6 0 0 0,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -5 0 0 -8 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 7 0}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;How do you recommend do solve that ?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Orit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 12:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164263#M1584</guid>
      <dc:creator>oriti</dc:creator>
      <dc:date>2014-04-02T12:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164264#M1585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Define&lt;/P&gt;&lt;P&gt;S = (C^=0);&lt;/P&gt;&lt;P&gt;S is a binary 0/1 matrix, so use the previous code I sent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164264#M1585</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-04-02T13:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164265#M1586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is elegant,thanks!&lt;/P&gt;&lt;P&gt;The only problem is, that you end this code with the &lt;STRONG&gt;binary matrix&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I need the&lt;STRONG&gt; original matrix&lt;/STRONG&gt; because I use it for other computations.(for ols coefficients)&lt;/P&gt;&lt;P&gt;How do you recommend to do that?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Orit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164265#M1586</guid>
      <dc:creator>oriti</dc:creator>
      <dc:date>2014-04-02T13:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164266#M1587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must have misunderstood my suggestion. You use S to find and extract the rows of the original matrix:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S = (C^=0);&lt;/P&gt;&lt;P&gt;cols = loc(S[+, ]&amp;gt;0);&lt;/P&gt;&lt;P&gt;if ncol(cols)&amp;gt;0 then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; D = C[,cols];&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; D = C;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164266#M1587</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-04-02T13:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164267#M1588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rick!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164267#M1588</guid>
      <dc:creator>oriti</dc:creator>
      <dc:date>2014-04-02T13:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero columns"</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164268#M1589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check this works for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=(C^=0);&lt;/P&gt;&lt;P&gt;Cnew=C[,loc(x[+,]^=0)];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164268#M1589</guid>
      <dc:creator>gin</dc:creator>
      <dc:date>2014-04-02T13:57:20Z</dc:date>
    </item>
  </channel>
</rss>

