hi,
if i knew the syntax to declare a variable in matlab, then maybe i
wouldnt be asking this, but i get this error saying:
`a' undefined near line 5 column 11
in this code:
1 % Read input sound file into vector x(n) and sampling frequency FS
2 [x,FS]=wavread('ton2.wav');
3 % Sample-by sample algorithm y(n)=a*x(n)
4 for n=1:length(x),
5 y(n)=a * x(n); <------- ERROR IS HERE
6 end;
7 % Write y(n) into output sound file with number of
8 % bits Nbits and sampling frequency FS
9 wavwrite(y,FS,Nbits,'tonealg.wav');