help-octave
[Top][All Lists]
Advanced

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

RE: Syntax error!!!!


From: Schirmacher, Rolf
Subject: RE: Syntax error!!!!
Date: Fri, 16 Nov 2007 21:29:04 +0100

Hello,

the error (and the persistency at the next line when commenting the
"critical" one) indicates that the real cause of the problem is in the line
before.

To me it looks like there is a closing bracket missing as there are three
opening and only two closing ones (probably there is one missing at the end
of the line ?)

BTW, what kind of audio processing are you going to do here?

Regards,

Rolf



> -----Original Message-----
> From: polmc [mailto:address@hidden
> Sent: Friday, November 16, 2007 6:45 PM
> To: address@hidden
> Subject: Syntax error!!!!
> 
> 
> 
> Hi!
> 
> I'm really desperate here, Im getting an error while calling 
> a function: 
> 
> I have a file named sinte.m which has:
> 
> function sinte(f)
>   
>   t=0:0.001:0.0854
>   Fs = 44100
>   tau6 = 0.018
>   A6 = 25.1
>   x6 = A6*(e^(-t/tau6).*sin(2*pi*f*t/Fs)
>   
>   tau7 = 0.016
>   A7 = 15.8
>   x7 = A7*e^(-t/tau7).*sin(2*pi*f*t/Fs)
>   
>   tau8 = 0.017
>   A8 = 19.9
>   x8 = A8*e^(-t/tau8).*sin(2*pi*f*t/Fs)
>   
>   tau9 = 0.038
>   A9 = 12.5
>   x9 = A9*e^(-t/tau9).*sin(2*pi*f*t/Fs)
>   
>   tau10 = 0.017
>   A10 = 10
>   x10 = A10*e^(-t/tau10).*sin(2*pi*f*t/Fs)
>   
>   x = x6 + x7 + x8 + x9 + x9 + x10;
>   
>   plot(x,t,'-*g');
>   xlabel('t');
>   
> 
>   
>   ylabel('x = x6 + x7 + x8 + x9 + x9 + x10');
>   
>   title('Sonido');
>   
>   endfunction
> 
> 
> 
> 
> 
> When I write in octave's console: 'sinte', or 'sinte(330)', 
> it gives me a
> syntax error in line:
> 
> tau7 = 0.016
> 
> 
> Now, if I comment that line, it gives me an error at next line:
> 
> A7 = 15.8
> 
> 
> Does anyone know what's going on?
> 
> Thanks!
> -- 
> View this message in context: 
> http://www.nabble.com/Syntax-error%21%21%21%21-tf4822802.html#
a13797864
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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