diff --git a/matlab/kordpert/dr1_k_order.m b/matlab/kordpert/dr1_k_order.m index 70233d21a..1adf9c426 100644 --- a/matlab/kordpert/dr1_k_order.m +++ b/matlab/kordpert/dr1_k_order.m @@ -138,24 +138,40 @@ function [dr,info,M_,options_,oo_] = dr1(dr,task,M_,options_,oo_) else % 2nd order [ysteady, ghx_u, g_2]=k_order_perturbation(dr,task,M_,options_, oo_ , ['.' mexext]); - %Here is pseud code for recovering ghxx ghxu ghxx ghs2 + %Here is code for recovering ghxx ghxu ghxx ghs2 s0 = 0; s1 = 0;%0 g_2cols=size(g_2,2); g_2rows=size(g_2,1); nExog=M_.exo_nbr; nspred=dr.nspred; - %ghxx=zeros(g_2rows); - for i=1:g_2cols + ghxx=zeros(g_2rows, nspred^2); + ghxu=zeros(g_2rows, nspred*nExog); + ghuu=zeros(g_2rows, nExog^2); + ghs2=zeros(g_2rows, 1); +% for i=1:g_2cols + i=0; + while i