From 609293b398d4fee995acbc71c10c0e0a260c7bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 14 Oct 2010 11:36:13 +0200 Subject: [PATCH] dr1.m: move up error message for purely forward models, otherwise it is not displayed with k_order_perturbation --- matlab/dr1.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matlab/dr1.m b/matlab/dr1.m index 3c1722d1e..2e9ae5b77 100644 --- a/matlab/dr1.m +++ b/matlab/dr1.m @@ -51,6 +51,10 @@ function [dr,info,M_,options_,oo_] = dr1(dr,task,M_,options_,oo_) info = 0; +if M_.maximum_endo_lag == 0 && options_.order > 1 + error(['2nd and 3rd order approximation not implemented for purely forward models']) +end + if options_.k_order_solver; dr = set_state_space(dr,M_); [dr,info] = k_order_pert(dr,M_,options_,oo_); @@ -254,10 +258,6 @@ if M_.maximum_endo_lead == 0 return end -if M_.maximum_endo_lag == 0 && options_.order > 1 - error(['2nd and 3rd order approximation not implemented for purely forward models']) -end - %forward--looking models if nstatic > 0 [Q,R] = qr(b(:,1:nstatic));