% script aliasing
clear
% construct a function that depends on one low and one
% high frequency
[y,Fs,bits]=wavread('tele_tones_1.wav');
class(y)
sound(y,Fs)
k=10;
tot=(length(y)-1)/Fs;
t=linspace(0,tot,length(y))';
plot(t,y)
A = linspace(0,360,n+1);
x=zeros(n+1,1);
x(m+2:n) = 1;
x(m+1) = .5;
x(1) = .5; x(n+1) = .5;
y2 = FFTRecur(x(1:n));
P2 = struct('a',real(y2(1:m+1))/m,'b',-imag(y2(2:m-1))/m);
P2.a(1)=P2.a(1)/2;P2.a(m+1)=P2.a(m+1)/2;
Bvals = linspace(0,360,2000)';
Gvals = CSeval(P2,360,Bvals);
plot(Bvals,Gvals,A,x,'o')
axis([0 360 -.05 1.05])
set(gca,'xTick',linspace(0,360,13))