From ecd8b2b5cdc133101a2f56b4afd4527812799f96 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer <jpfeifer@gmx.de> Date: Fri, 20 Aug 2021 13:08:36 +0200 Subject: [PATCH] mode_check.m: fix logical condition that may otherwise lead to 0 size of interval (cherry picked from commit 58b336b26396fb21c39a661a2a4a317801b63e64) --- matlab/mode_check.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/mode_check.m b/matlab/mode_check.m index b45a2c9ecb..af1933e0a0 100644 --- a/matlab/mode_check.m +++ b/matlab/mode_check.m @@ -105,7 +105,7 @@ for plt = 1:nbplt kk = (plt-1)*nstar+k; [name,texname] = get_the_name(kk,TeX,Model,EstimatedParameters,DynareOptions); xx = x; - if x(kk)~=0 || ~isinf(BoundsInfo.lb(kk)) || ~isinf(BoundsInfo.lb(kk)) + if x(kk)~=0 && ~isinf(BoundsInfo.lb(kk)) && ~isinf(BoundsInfo.ub(kk)) l1 = max(BoundsInfo.lb(kk),(1-sign(x(kk))*ll)*x(kk)); m1 = 0; %lower bound l2 = min(BoundsInfo.ub(kk),(1+sign(x(kk))*ll)*x(kk)); %upper bound else -- GitLab