% The predictor example in lecture 4
% y(k+1)=0.9y(k) + w(k+1) + 0.7w(k) and
% y(k+1)=0.9y(k) + w(k+1) - 0.7w(k)
% All polynomials in forward shift form
% Assume deg(A(z))=deg(C(z))
A=[1 -0.9];
C=[1 0.7];

d=1;
[F,G]=deconv([C zeros(1,d-1)],A)
variance_onesteppredictor = F*F'
d=2;
[F,G]=deconv([C zeros(1,d-1)],A)
variance_twosteppredictor = F*F'

% Lets try a very similar system
C=[1 -0.7];

d=1;
[F,G]=deconv([C zeros(1,d-1)],A)
variance_onesteppredictor = F*F'
d=2;
[F,G]=deconv([C zeros(1,d-1)],A)
variance_twosteppredictor = F*F'
