<?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: &amp;quot;Find and Replace&amp;quot; in IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/quot-Find-and-Replace-quot-in-IML/m-p/238008#M2506</link>
    <description>&lt;P&gt;The&lt;A href="http://blogs.sas.com/content/iml/2011/05/16/finding-data-that-satisfy-a-criterion.html" target="_self"&gt; LOC function will find the location &lt;/A&gt;of the elements that you are looking for. Then you can use regular assignment to replace the numbers.&amp;nbsp; For example, to replace all values -99 with a missing value, do the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
x = {1 -99   3 4,
     5   6 -99 8};
idx = loc(x = -99);   /* find location of elements */
x[idx] = .;           /* replace those elements */
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 06 Dec 2015 11:52:12 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-12-06T11:52:12Z</dc:date>
    <item>
      <title>"Find and Replace" in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/quot-Find-and-Replace-quot-in-IML/m-p/238005#M2505</link>
      <description>&lt;P&gt;In IML, is there any way to find every occurrence of a certain number in a matrix and replace it with another number, and what is the syntax for this?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2015 10:59:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/quot-Find-and-Replace-quot-in-IML/m-p/238005#M2505</guid>
      <dc:creator>dvtarasov</dc:creator>
      <dc:date>2015-12-06T10:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: "Find and Replace" in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/quot-Find-and-Replace-quot-in-IML/m-p/238008#M2506</link>
      <description>&lt;P&gt;The&lt;A href="http://blogs.sas.com/content/iml/2011/05/16/finding-data-that-satisfy-a-criterion.html" target="_self"&gt; LOC function will find the location &lt;/A&gt;of the elements that you are looking for. Then you can use regular assignment to replace the numbers.&amp;nbsp; For example, to replace all values -99 with a missing value, do the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
x = {1 -99   3 4,
     5   6 -99 8};
idx = loc(x = -99);   /* find location of elements */
x[idx] = .;           /* replace those elements */
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Dec 2015 11:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/quot-Find-and-Replace-quot-in-IML/m-p/238008#M2506</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-12-06T11:52:12Z</dc:date>
    </item>
  </channel>
</rss>

