clear all;
close all;

a1=0.5;
a2=0.5;
b1=0.5;
b2=0.5;
V(1)=1;
V(2)=2;
k =0;

t=1:1000;
u=sin(t);

phi=zeros(1000,4);


for n = 3:1000
%u = randn(1,1000);

V(n) = a1*V(n-1) + a2*V(n-2) + b1*u(n) +b2*u(n-1);
Z = randn(1,1000);

y(n) = V(n) + Z(n) *k ;
hold on
grid on
plot(n,y(n),'*')
end
plot(y)
 phi=[];
for n = 3:1000
   phi(n,:) = [[u(n)],[u(n-1)],[y(n-1)],[y(n-2)]];
    
end
