help-octave
[Top][All Lists]
Advanced

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

Re: Syntax befuddlement


From: Dmitri A. Sergatskov
Subject: Re: Syntax befuddlement
Date: Sat, 27 Dec 2003 15:59:22 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210


Joe Koski wrote:


octave:2> t=[0.002:0.001:0.007]
t =

  0.0020000  0.0030000  0.0040000  0.0050000  0.0060000  0.0070000

octave:3> fnormhat=0.5*(angle(-x(t+1).*conj(x(t-1)))+pi)/(2*pi)
                                   ^^^          ^^^^
t here is an index for x vector. For your t,  t-1 is rounded to -1
and x(-1) is undefined (index should be a positive integer)...

error: invalid vector index = -1
error: evaluating argument list element number 1
...

Also conj(x)==x, if x is real.

Regards,

Dmitri.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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