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 Matlab
time-shift
Johannes Pfeifer 2013-06-23 12:24:06 +02:00
parent 0eca453519
commit 2eb43cf2f6
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ nspred = M.nspred;
if order>1 && options.loglinear
error('The loglinear-option currently only works at order 1')
end
if M.maximum_endo_lead == 0 && order>1
error(['2nd and 3rd order approximation not implemented for purely ' ...
'backward models'])
end
switch(order)
case 1