Function for Vector Autoregressive with Changing Inputs
显示 更早的评论
I want to use "vgxset" with increasing inputs (In my case phi_hat):
% My first phi_hat is size 5 by 1+5*1 and I want to use in:
Spec = vgxset('a',phi_hat(:,1),'AR',{phi_hat(:,2:6)})
%My second phi_hat is size 5 by 1+5*2 and I want to use in::
Spec = vgxset('a',phi_hat(:,1),'AR',{phi_hat(:,2:6),phi_hat(:,7:11)})
%My third phi_hat is size 5 by 1+5*3 and I want to use in::
Spec = vgxset('a',phi_hat(:,1),'AR',{phi_hat(:,2:6),phi_hat(:,7:11),phi_hat(:,12:16)})
%My fourth phi_hat is size 5 by 1+5*4 and I want to use in::
Spec = vgxset('a',phi_hat(:,1),'AR',{phi_hat(:,2:6),phi_hat(:,7:11),phi_hat(:,12:16),phi_hat(:,17:21)})
....
%My pth phi_hat is size 5 by 1+5*p and I want to use in::
Spec=vgxset('a',phi_hat(:,1),'AR',{phi_hat(:,2:6),phi_hat(:,7:11),phi_hat(:,12:16),phi_hat(:,17:21),.....,
phi_hat(:,(p-1)*5+2:1+5*p)})
¿Can I use loop "for" in order to reduce these codes? ¿How can I do this?
Thank you
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Conditional Mean Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!