From bug-octave-request at bevo dot che dot wisc dot edu Fri Dec 13 14:53:52 2002 Subject: Re: bug report From: Paul Kienzle To: Hew How Chee Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 13 Dec 2002 15:52:13 -0500 On Wed, Dec 11, 2002 at 09:48:33PM -0600, Hew How Chee wrote: > Hi, > I am using GNU Octave, version 2.1.36 (i686-pc-cygwin) and is trying to > code rcos.m (error in rcos.m). When I execute rcos 2 times, octave jump > out. see error below. > > > function result = rcos (order,fs,baud_period,beta) > T=baud_period > t=0:1:10 > x=sin(pi*t/T)/(pi*t) * ( cos(pi* t * beta / T) / (1 - 4*beta*beta*t*t /( T*T) ); > endfunction You are missing a closing parenthesis in your expression for x. Try the following: function result = rcos (order,fs,baud_period,beta) T=baud_period t=0:1:10 x=sin(pi*t/T)/(pi*t) * ( cos(pi* t * beta / T) / (1 - 4*beta*beta*t*t /( T*T) ) ); endfunction > At Octave command prompt, > > >> rcos(1) > parse error near line 5 of file /usr/share/octave/2.1.36/m/signal/rcos.m > > >>> x=sin(pi*t/T)/(pi*t) * ( cos(pi* t * beta / T) / (1 - 4*beta*beta*t*t /( T*T) ); > ^ > > error: `rcos' undefined near line 1 column 1 > error: evaluating index expression near line 1, column 1 > >> rcos(1) > panic: impossible state reached in file `parse.y' at line 1058 > panic: IOT instruction -- stopping myself... > > Regards, > Hew > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- > ------------------------------------------------------------- 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 -------------------------------------------------------------