<?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: Non-integer index of a vector in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98209#M703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My experiment indicates that there is some fuzzing as well, so that x[1-epsilon] still returns x[1]:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=1:5;&lt;/P&gt;&lt;P&gt;i = 2 - 10##-T(11:16);&lt;/P&gt;&lt;P&gt;y = x&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;print i[format=20.16] y;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Aug 2013 15:29:43 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2013-08-02T15:29:43Z</dc:date>
    <item>
      <title>Non-integer index of a vector</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98208#M702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've noticed that using a non-integer index on a vector returns a value. For example, if I set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x = 1:5;&lt;/P&gt;&lt;P&gt;y = x[{1.2 5.7}];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then y returns a 2-vector {1, 5}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the indexes are having the floor function applied before being used to find elements of x. Is this correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 15:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98208#M702</guid>
      <dc:creator>stoffprof</dc:creator>
      <dc:date>2013-08-02T15:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Non-integer index of a vector</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98209#M703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My experiment indicates that there is some fuzzing as well, so that x[1-epsilon] still returns x[1]:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=1:5;&lt;/P&gt;&lt;P&gt;i = 2 - 10##-T(11:16);&lt;/P&gt;&lt;P&gt;y = x&lt;I&gt;;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;print i[format=20.16] y;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 15:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98209#M703</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-08-02T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Non-integer index of a vector</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98210#M704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't that what we'd expect from the floor function? Anything less than 2 (even if just epsilon) is 1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 15:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98210#M704</guid>
      <dc:creator>stoffprof</dc:creator>
      <dc:date>2013-08-02T15:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Non-integer index of a vector</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98211#M705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add this to the end of the previous program:&lt;/P&gt;&lt;P&gt;f = floor(i);&lt;/P&gt;&lt;P&gt;print i[format=20.16] f y;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll see that the conversion of noninteger subscripts is different from a simple floor.&amp;nbsp; The fuzzing of near-integer values is important to correctly handle floating point arithmetic.&amp;nbsp; If you reread my previous post, you'll see that I stated that x[1-epsilon] = x[1], not x[0] (which would be an error).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 19:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Non-integer-index-of-a-vector/m-p/98211#M705</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-08-02T19:14:33Z</dc:date>
    </item>
  </channel>
</rss>

