From 459fce927b52e4241fa007d199458e485fa8055b Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Fri, 20 Aug 2021 13:29:37 +0200 Subject: [PATCH] mode_check.m: take care of almost binding bounds --- matlab/mode_check.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/mode_check.m b/matlab/mode_check.m index af1933e0a..0d2fbf852 100644 --- a/matlab/mode_check.m +++ b/matlab/mode_check.m @@ -124,10 +124,10 @@ for plt = 1:nbplt end binding_lower_bound=0; binding_upper_bound=0; - if isequal(x(kk),BoundsInfo.lb(kk)) + if abs(x(kk)-BoundsInfo.lb(kk))<1e-8 binding_lower_bound=1; bound_value=BoundsInfo.lb(kk); - elseif isequal(x(kk),BoundsInfo.ub(kk)) + elseif abs(x(kk)-BoundsInfo.ub(kk))<1e-8 binding_upper_bound=1; bound_value=BoundsInfo.ub(kk); end