Add check for purely backwards model to k_order_pert
The k_order_solver does not solve purely backwards models (as is the case in stochastic_solvers.m). But in contrast to stochastic_solvers, there is no check and no warning. Entering the mex-file then results in a crash of Matlabtime-shift
parent
0eca453519
commit
2eb43cf2f6
|
@ -30,6 +30,10 @@ nspred = M.nspred;
|
||||||
if order>1 && options.loglinear
|
if order>1 && options.loglinear
|
||||||
error('The loglinear-option currently only works at order 1')
|
error('The loglinear-option currently only works at order 1')
|
||||||
end
|
end
|
||||||
|
if M.maximum_endo_lead == 0 && order>1
|
||||||
|
error(['2nd and 3rd order approximation not implemented for purely ' ...
|
||||||
|
'backward models'])
|
||||||
|
end
|
||||||
|
|
||||||
switch(order)
|
switch(order)
|
||||||
case 1
|
case 1
|
||||||
|
|
Loading…
Reference in New Issue