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

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

[Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units


From: anonymous
Subject: [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol
Date: Mon, 9 May 2016 12:37:54 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36

Follow-up Comment #2, bug #47865 (project octave):

in matlab help cmpxpair says:

    Y = cplxpair(X,TOL) uses a relative tolerance TOL to perform the
    comparisons needed for the complex conjugate pairings. TOL must
    be a scalar such that 0<=TOL<1. The default is TOL = 100*EPS.

I take this to mean that the default for TOL is 100*EPS, not 100 (which is
later multiplied by EPS).  If I set TOL=0.001 it should pair complex numbers
where both the real is within +/-0.001 and the negative of the imaginary is
within +/-0.001.  This is consistent with the results I get from your test
cases

>> cplxpair (z2, -0.1)
Error using cplxpair (line 41)
Relative tolerance TOL must be a scalar such that 0<=TOL<1. 
>> cplxpair (z2, 0)
Error using cplxpair (line 78)
Complex numbers can't be paired. 
>> cplxpair (z2, 0.99)
ans =
   1.0e+03 *
   2.000000000000000
   2.000000000000000
>> cplxpair (z2, 1)
Error using cplxpair (line 41)
Relative tolerance TOL must be a scalar such that 0<=TOL<1. 
>> cplxpair (z2, 2)
Error using cplxpair (line 41)
Relative tolerance TOL must be a scalar such that 0<=TOL<1. 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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