Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

getting AR residuals to a vextor

2 views (last 30 days)
dav
dav on 23 Feb 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi,
I need to fit an ar(15) model (WITH OUT USING ARX()IN MATLAB) to yt1 data created bu the following code and get the residuals to a vector. can someone please help?
code:
a0 = 0.05; a1 = 0.1; b1 = 0.85;
epsi=zeros(2101,1);
simsig=zeros(2101,1);
for i = 1:2101
if (i==1)
simsig(i) = a0 ;
s=(simsig(i))^0.5;
epsi(i) = normrnd(0,1) * s;
else
simsig(i) = a0+ a1*(epsi(i-1))^2+ b1*simsig(i-1);
s=(simsig(i))^0.5;
epsi(i) = normrnd(0,1) * s;
end
end
yt1=epsi.^2;

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!