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

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

[Octave-bug-tracker] [bug #44071] ismember fails with unsorted complex s


From: Carlo de Falco
Subject: [Octave-bug-tracker] [bug #44071] ismember fails with unsorted complex set
Date: Fri, 23 Jan 2015 08:11:27 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:35.0) Gecko/20100101 Firefox/35.0

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

the values stored in the attached file
are complex.


>> load ismember_bug.mat 
>> whos
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        A           1x1                          8  double
        ii          1x1                          8  double
   c    s         299x1                       4784  double

Total is 301 elements using 4800 bytes

>> 


If using only the real part of 's' ismember works as you 
would expect:


>> disp(ismember(A, real (s)));
1


Checking for a complex zero, i.e. 0+i0 also works:


>> disp(ismember(complex(0,0), real (s)));
 1


I don't know whether it would be correct 
for ismember to report true when looking for 
a zero of type double in an array of type
complex.

Does anyone know what Matlab does in this case?




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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