From c1deac7fd2d96ebc848dc4bd10c4eeebe839120c Mon Sep 17 00:00:00 2001
From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Mon, 21 Dec 2009 09:23:46 +0000
Subject: [PATCH] 4.1 branch: merged r3275 (added error message for 2nd or 3rd
 order approximation of purely backward models)

git-svn-id: https://www.dynare.org/svn/dynare/branches/4.1@3278 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 matlab/dr1.m | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/matlab/dr1.m b/matlab/dr1.m
index 422ead5b56..fd0f545d47 100644
--- a/matlab/dr1.m
+++ b/matlab/dr1.m
@@ -191,9 +191,13 @@ sdyn = M_.endo_nbr - nstatic;
 b = zeros(M_.endo_nbr,M_.endo_nbr);
 b(:,cols_b) = jacobia_(:,cols_j);
 
-if M_.maximum_endo_lead == 0 && options_.order == 1  
+if M_.maximum_endo_lead == 0
     % backward models: simplified code exist only at order == 1
     % If required, use AIM solver if not check only
+    if options_.order > 1
+        error(['2nd and 3rd order approximation not implemented for purely ' ...
+               'backward models'])
+    end
     if (options_.aim_solver == 1) && (task == 0)
         if options_.order > 1
             error('Option "aim_solver" is incompatible with order >= 2')
-- 
GitLab