%  cl963.m
%  prepares some spectra and realizations



%  a is the autoregressive polynomial in the form [1, -a_1, -a_2 ...];
%  b is the moving average polynomial in the form [b_0,  b_1, b_2 ... ] 
%

a=[1  ];
b=[1 -1];

[sp,f]=show2(b,a,128,' ');
subplot(3,2,1)
semilogy(f(1:65),sp(1:65));title('spectrum')


u=randn(100,1);
y=filter(b,a,u);
subplot(3,2,2) 

plot(y),title('1=[a], b=[1 -1]')


a=[1 -1.2 .9 ];
b=1;

[sp,f]=show2(b,a,128,' ');
subplot(3,2,3)
semilogy(f(1:65),sp(1:65));title('spectrum')


u=randn(100,1);
y=filter(b,a,u);
subplot(3,2,4) 

plot(y),title('a=[1 -1.2 .9],b=1')


a=[1 ];
b=[ 1 1];

[sp,f]=show2(b,a,128,' ');
subplot(3,2,5)
semilogy(f(1:65),sp(1:65));title('spectrum')


u=randn(100,1);
y=filter(b,a,u);
subplot(3,2,6) 

plot(y),title('a=[1],b=[1 1]')


print -dps graph1.ps
pause    
%%%% generate next series of graphs 

a=[1 -.995];
b=[1 ];

[sp,f]=show2(b,a,128,' ');
subplot(3,2,1)
semilogy(f(1:65),sp(1:65));title('spectrum')


u=randn(100,1);
y=filter(b,a,u);
subplot(3,2,2) 

plot(y),title('a=[1 -.995],b=[1]')


a=[1 -.995 ];
b=[1 -.8];

[sp,f]=show2(b,a,128,' ');
subplot(3,2,3)
semilogy(f(1:65),sp(1:65));title('spectrum')


u=randn(100,1);
y=filter(b,a,u);
subplot(3,2,4) 

plot(y),title('a=[1 -.995],b=[1 -.8]')


a=[1 0 0 0 -.95];
b=[ 1 ];

[sp,f]=show2(b,a,128,' ');
subplot(3,2,5)
semilogy(f(1:65),sp(1:65));title('spectrum')


u=randn(100,1);
y=filter(b,a,u);
subplot(3,2,6) 

plot(y),title('a=[1 0 0 0 -.8],b=[1]')


print -dps graph2.ps

    
