From 136537137981c1d9ab7157c38aa8a3f2a8f5e4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian?= <stephane.adjemian@univ-lemans.fr> Date: Mon, 12 Jun 2017 16:05:01 +0200 Subject: [PATCH] Merge pull request #1466 from JohannesPfeifer/discret_policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust error message if number of instruments does not match number o… (cherry picked from commit c45f9b776dd6a721ddfb72c16d0c629d88725fdb) --- 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 0837067b2..8f8bf6b8a 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