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

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

[Octave-bug-tracker] [bug #47951] find complex number array elements wit


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #47951] find complex number array elements with condition
Date: Wed, 18 May 2016 03:14:24 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Update of bug #47951 (project octave):

                  Status:                    None => Wont Fix               
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Thanks for the bug report. This is a documented incompatibility with Matlab.
There are few intentional incompatibilities, but this is one of them.

>From the manual section "Comparison Operators"

For complex numbers, the following ordering is defined: z1 < z2 if and only
if

  abs (z1) < abs (z2)
  || (abs (z1) == abs (z2) && arg (z1) < arg (z2))

This is consistent with the ordering used by max, min and sort, but is not
consistent with MATLAB, which only compares the real parts. 

https://www.gnu.org/software/octave/doc/interpreter/Comparison-Ops.html

So complex(-1,0) is not less than zero intentionally.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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