help-octave
[Top][All Lists]
Advanced

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

Syntax error!!!!


From: polmc
Subject: Syntax error!!!!
Date: Fri, 16 Nov 2007 09:44:45 -0800 (PST)

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.



reply via email to

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