Skip to content
Snippets Groups Projects
Verified Commit ecd8b2b5 authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

mode_check.m: fix logical condition that may otherwise lead to 0 size of interval

(cherry picked from commit 58b336b2)
parent ab8ebdd8
Branches
Tags
No related merge requests found
...@@ -105,7 +105,7 @@ for plt = 1:nbplt ...@@ -105,7 +105,7 @@ for plt = 1:nbplt
kk = (plt-1)*nstar+k; kk = (plt-1)*nstar+k;
[name,texname] = get_the_name(kk,TeX,Model,EstimatedParameters,DynareOptions); [name,texname] = get_the_name(kk,TeX,Model,EstimatedParameters,DynareOptions);
xx = x; 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 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 l2 = min(BoundsInfo.ub(kk),(1+sign(x(kk))*ll)*x(kk)); %upper bound
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment