help-octave
[Top][All Lists]
Advanced

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

Re: Using functions "real" and "imag" in vector


From: Judd Storrs
Subject: Re: Using functions "real" and "imag" in vector
Date: Sat, 13 Jun 2009 02:26:29 -0400



On Sat, Jun 13, 2009 at 12:36 AM, James Sherman Jr. <address@hidden> wrote:
As written there, it works fine for me.  The error would seem to indicate that there was no input to the real function, hence too few inputs (real expects one input).

I don't think this should make a difference, but try removing the space between real and (1).  Honestly, I'm kinda stumped at what would cause that error here.

The space inside the [] does seem to be the difference at least on 3.0.1 and a 3.1.55 I built from hg on 4/22. (I haven't built 3.2 yet). I think it is related parsing vectors that can be created without commas. i.e.

octave:1> real(1)
ans =  1
octave:2> real (1)
ans =  1
octave:3> [ real(1) ]
ans =  1
octave:4> [ real (1) ]
error: Invalid call to real.  Correct usage is:
...snip...
octave:4> [ (real (1)) ]
ans =  1


reply via email to

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