Please expalin the error
Afficher commentaires plus anciens
Hi ,
for the data set y, I need to fit an ar model and calculate the best order using aic.
I used the following code to do that:
V = arxstruc(y,struc(1:15));
m = selstruc(V,'aic');
However, I got the following error when I tried to run it.
Error using struc (line 21)
Not enough input arguments.
Error in big100 (line 47)
V = arxstruc(y,struc(1:15));
Can someone correct this please?
Full code:
clc;
clear;
a0 = 0.05; a1 = 0.1; b1 = 0.85;
epsi=zeros(3000,1);
simsig=zeros(3000,1);
for i = 1:3000
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;
y = yt1(2001:3000);
V = arxstruc(y,struc(1:15));
m = selstruc(V,'aic');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Nonlinear ARX Models dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!