by ursula » Tue Oct 06, 2009 6:47 pm
Thanks a lot!
I did it that way and it turned out just fine.
Here is the code, if someone needs it (I attached prueba.m, needed to make itwork):
//NOTE: Be sure to write the variables in the preamble as following:
//first variables that are both forward and predetermined (state variables),
//then forward variables (control variables),
//and last variables that are just predetermined (exogenous variables).
// Calculates structural matrices: GG FF MM HH (LL JJ KK are all zero to keep it simple)
params=M_.params;
[g1] = prueba(params)
M_orden=M_.lead_lag_incidence;
M_orden(M_orden==0)=size(g1,2)+1;
g1(:,24)=0;
FF=zeros((oo_.dr.nboth+oo_.dr.nfwrd),(oo_.dr.nboth+oo_.dr.nfwrd));
GG=zeros((oo_.dr.nboth+oo_.dr.nfwrd),(oo_.dr.nboth+oo_.dr.nfwrd));
HH=zeros((oo_.dr.nboth+oo_.dr.nfwrd),(oo_.dr.nboth+oo_.dr.nfwrd));
MM=zeros(M_.exo_nbr,M_.exo_nbr);
FF=g1(1:(oo_.dr.nboth+oo_.dr.nfwrd),M_orden(3,1:(oo_.dr.nboth+oo_.dr.nfwrd)));
GG=g1(1:(oo_.dr.nboth+oo_.dr.nfwrd),M_orden(2,1:(oo_.dr.nboth+oo_.dr.nfwrd)));
HH=g1(1:(oo_.dr.nboth+oo_.dr.nfwrd),M_orden(1,1:(oo_.dr.nboth+oo_.dr.nfwrd)));
MM=g1(1:(oo_.dr.nboth+oo_.dr.nfwrd),M_orden(2,(oo_.dr.nboth+oo_.dr.nfwrd)+1:size(g1,1)));
- Attachments
-
- prueba.m
- (1.6 KiB) Downloaded 125 times