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

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

[Octave-bug-tracker] [bug #43728] document / warn about integer range mu


From: Markus Appel
Subject: [Octave-bug-tracker] [bug #43728] document / warn about integer range multiplied with floating point scalar
Date: Mon, 27 Jul 2015 19:51:03 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

Follow-up Comment #5, bug #43728 (project octave):

I don't agree that this is only "incorrect documentation" ... since the
behaviour is not matlab-compatible. Say you create two grids in Matlab
(R2014b) with range times scalar and then use intersect to find common grid
points:

>> x=(-3:1)*0.1;
>> y=(-2:2)*0.1;
>> intersect(x,y)

ans =

   -0.2000   -0.1000         0    0.1000


while octave gives:


>> x=(-3:1)*0.1;
>> y=(-2:2)*0.1;
>> intersect(x,y)
ans = 0


Using brackets [] instead of parenthesis () is indeed what I meant to do in
the first place, and it gives the same result in both octave and Matlab.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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