function X=autoregr2(th,n)

a=0.3;
X=zeros(1,n);
X(1)=a;
for i=2:n
    X(i)=th*X(i-1)+grand(1,"nor",0,1);
end

endfunction
