octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47106] finding values in a vector with for-lo


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #47106] finding values in a vector with for-loop and if-statement
Date: Wed, 10 Feb 2016 02:52:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0

Update of bug #47106 (project octave):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Thanks for taking the time to file a report, but this is not a bug, this is
normal floating point precision at work.

Compare the results with your definition


x = 0:.2:3;


and this one


x = [0:15] ./ 5;


And use this code to show the values of the elements that are not exactly what
you think they are:


[~, ~, y] = find (rem ([0:.2:3] .* 5, 1))


This is also documented in the manual:
https://www.gnu.org/software/octave/doc/interpreter/Ranges.html

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47106>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]