Please expalin the error
이전 댓글 표시
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');
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Nonlinear ARX Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!