[Top][All Lists]

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

[Octave-bug-tracker] [bug #30521] Error in diag function for complex num

From: Rik
Subject: [Octave-bug-tracker] [bug #30521] Error in diag function for complex numbers
Date: Fri, 23 Jul 2010 01:05:57 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100628 Ubuntu/9.10 (karmic) Firefox/3.6.6

Update of bug #30521 (project octave):

                  Status:                    None => Confirmed              


Follow-up Comment #1:

The behavior is slightly better in the development version of Octave (3.3.51)
in that the first two parts work.  However, the third step is still broken.

m1 = [0.1+2i]
m2 = diag(m1)
m3 = diag(m2)

m1 =    0.1000 + 2.0000i
m2 =  0.10000 + 2.00000i
m3 =  0.10000

ans = complex matrix
ans = complex scalar
ans = scalar

>From the documentation, diag is designed to work on a vector to produce a
matrix or on a matrix to produce a vector.  I'm guessing that there's no test
to see if the input is "complex scalar" and handle that case.  At least for a
scalar input, it returns a scalar output and that should probably be the
default for complex inputs as well.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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