%-----------------------------------
% script spectrum
clear
[y,Fs,bits]=wavread('tele_1.wav');
a=input('starting point')
n=input('length of series (=power of 2)')
x=y(a:a+n); m=n/2; 
sound(x,Fs)
%-----------------------------------
y = fft(x(1:n));
E = abs(y(1:m+1))
subplot(2,1,1); 
plot(x)
subplot(2,1,2);
plot(E)
for i=1:m+1
    if (E(i)>100)
        i-1
    end
end
%axis([0 360 -.05 1.05])
%set(gca,'xTick',linspace(0,360,13))