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

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

[Octave-bug-tracker] [bug #32053] matlab/Octave differences for complex


From: Michael Godfrey
Subject: [Octave-bug-tracker] [bug #32053] matlab/Octave differences for complex
Date: Wed, 05 Jan 2011 18:31:28 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110103 Fedora/3.6.13-1.fc14 Firefox/3.6.13

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

John,
I understand that cc and cc(1) are real elements of
a complex array.  But, they are allocated storage as if
they were complex (a good thing, of course).

The following example (both Octave and Matlab) adds a bit
of confusion, I think:

octave:23> zz = complex(1,0*j)
zz =  1 + 0i
octave:24> isreal(zz(1))
ans =  1
octave:25> isreal(zz)
ans = 0
octave:26> zz(1) = complex(1,0*j)
zz =  1
octave:27> isreal(zz)
ans =  1
octave:28> isreal(zz(1))
ans =  1
octave:29> 
======================
Matlab is slightly different in that it, of course,
shows:
>> zz(1) = complex(1,0*j)

zz =

     1

=======================
I agree that the whos output should be made like Matlab.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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