help-octave
[Top][All Lists]
Advanced

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

RE: Syntax error!!!!


From: polmc
Subject: RE: Syntax error!!!!
Date: Sat, 17 Nov 2007 03:33:32 -0800 (PST)

Thanks, it works now!

Im trying to do some schoolwork, which asks me to synthetize a sound given
some frequency (330 hz in this case). So what I have to do is to sum into
one equation all the sound's harmonics (more or less, I actually don't
undertand a lot how it works)...

Now the problem is, that, even if it works when I do the 'wavwrite(330)', it
makes a wav that almost doesn't sound... unless I take away the '/Fs' part
in each equation :P

But I'll try to find it out by myself!

Thanks!


schi wrote:
> 
> 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
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Syntax-error%21%21%21%21-tf4822802.html#a13808229
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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