meto
Junior Member level 1
how to generate 100 sample data using the AR(1) model?I have generated but I don't know this code is true or not.And also how can i calculate the autocorrelation matrix?
"a=0.5;
n=0.001;
x(1)=100;
for k=2:100
x(k)=a*x(k-1)+n;
end"
"a=0.5;
n=0.001;
x(1)=100;
for k=2:100
x(k)=a*x(k-1)+n;
end"