From 4f06afea9c92b3b8ca7e007d56f369d333daf9a4 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Sun, 11 Jun 2017 10:55:14 +0200
Subject: [PATCH] Adjust error message if number of instruments does not match
 number of omitted equations

---
 matlab/discretionary_policy_1.m | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/matlab/discretionary_policy_1.m b/matlab/discretionary_policy_1.m
index 0837067b2f..8f8bf6b8a2 100644
--- a/matlab/discretionary_policy_1.m
+++ b/matlab/discretionary_policy_1.m
@@ -98,8 +98,10 @@ instr_nbr=endo_nbr-eq_nbr;
 if instr_nbr==0
     error('discretionary_policy:: There are no available instruments, because the model has as many equations as variables.')
 end
-if size(Instruments,1)~= instr_nbr
-    error('discretionary_policy:: There are more declared instruments than omitted equations.')
+if size(Instruments,1)< instr_nbr
+    error('discretionary_policy:: There are fewer declared instruments than omitted equations.')
+elseif size(Instruments,1)> instr_nbr
+    error('discretionary_policy:: There are more declared instruments than omitted equations.')    
 end
 
 instr_id=nan(instr_nbr,1);
-- 
GitLab