Filter out stale loglinear option

With a previously set loglinear option, both k_order_pert and
stochastic_solvers at order>1 transformed the first order solution, but
kept the higher order terms untransformed. Now, both functions output an
error.
time-shift
Johannes Pfeifer 2013-05-08 18:18:34 +02:00
parent 29ff66856a
commit 42081aec88
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,10 @@ endo_nbr = M.endo_nbr;
exo_nbr = M.exo_nbr;
nspred = M.nspred;
if order>1 && options.loglinear
error('The loglinear-option currently only works at order 1')
end
switch(order)
case 1
[err, g_1] = k_order_perturbation(dr,M,options);

View File

@ -271,5 +271,8 @@ if options_.loglinear == 1
dr.ghx = repmat(1./dr.ys(k1),1,size(dr.ghx,2)).*dr.ghx.* ...
repmat(dr.ys(k1(klag(:,1)))',size(dr.ghx,1),1);
dr.ghu = repmat(1./dr.ys(k1),1,size(dr.ghu,2)).*dr.ghu;
if options_.order>1
error('Loglinear options currently only works at order 1')
end
end