how to apply iddata into calculation?
Posted
by
Sam
on Stack Overflow
See other posts from Stack Overflow
or by Sam
Published on 2012-03-18T20:51:11Z
Indexed on
2012/03/19
2:03 UTC
Read the original article
Hit count: 277
matlab
I am trying to figure out how to combine the input and output data into the ARX model and then apply it into the BIC (Bayesian Information Criterion) formula. Below is the code that I am currently working on:
for i=1:30; %% Set Model Order
data=iddata(output,input,1);
model = arx(data,[8 9 i]);
yp = predict(model,data);
ye = regress(data,yp{1,1}(1:4018,1));
M(i) = var(yp);
BIC(i)=(N+i*(log(N)-1))/(N-i)*log(M(i));
end
But it does not work. It keep on giving me an error something like below:
"The syntax "Data{...}" is not supported. Use the "getexp" command to extract individual experiments from an IDDATA object." I did not understand what does that mean. Can someone explain it to me and where do I do wrong on my piece of code?
Thanks in advance.
Sam.
© Stack Overflow or respective owner