On 09/08/2012 08:52 PM, Michael D Godfrey wrote:

[snip]

> And, this may just add to the noise, but a few days ago I created a
> vector which was composed
> of complex elements, and some "real" elements, i.e. isreal(x(4)) said 1
> and whos x(4) said
> it was only 8 bytes.

That is similar to the example:

octave:20> z = complex([1 2 3],[1 0 2])
z =

    1 + 1i   2 + 0i   3 + 2i

octave:21> isreal(z)
ans = 0
octave:22> isreal(z(1))
ans = 0
octave:23> isreal(z(2))
ans =  1
octave:24> whos z z(1) z(2)
Variables in the current scope:

    Attr Name        Size                     Bytes  Class
    ==== ====        ====                     =====  =====
    c    z           1x3                         48  double
    c    z(1)        1x1                         16  double
         z(2)        1x1                          8  double

Total is 5 elements using 72 bytes

...

Interchanging the square and curved parentheses is another, simpler 
illustration:

octave:28> iscomplex(complex(1,0))
ans =  1
octave:29> iscomplex([complex(1,0)])
ans = 0

Dan


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to