Commit 2eb43cf2 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

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
parent 0eca4535
...@@ -30,6 +30,10 @@ nspred = M.nspred; ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment