From 4e3cd7a0f2ffa857cf68a04a611bd3a20cfcff1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 26 Jul 2022 22:36:30 +0200
Subject: [PATCH] Fix bug under MATLAB < R2016b introduced in
 906062cfe5410ed476203c9e59a19a3ef39722c1

The logic for testing the MATLAB version was incorrect.

(cherry picked from commit ad97361f6744bdd8dac4f047b601446bc402b876)
---
 matlab/+occbin/mkdatap_anticipated_2constraints_dyn.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab/+occbin/mkdatap_anticipated_2constraints_dyn.m b/matlab/+occbin/mkdatap_anticipated_2constraints_dyn.m
index d61886025f..d74db4c211 100644
--- a/matlab/+occbin/mkdatap_anticipated_2constraints_dyn.m
+++ b/matlab/+occbin/mkdatap_anticipated_2constraints_dyn.m
@@ -98,7 +98,7 @@ if T_max > 0
         % check if last binding regime was already stored
         tmp = 0*binding_indicator;
         tmp(1:end-T_max+1,:) = binding_indicator(T_max:end,:);
-        if ~isoctave && ~matlab_ver_less_than('9.1') % Automatic broadcasting was introduced in MATLAB R2016b
+        if ~isoctave && matlab_ver_less_than('9.1') % Automatic broadcasting was introduced in MATLAB R2016b
             itmp = find(~any(bsxfun(@minus, dictionary.binding_indicator(1:length(tmp)*2,:), tmp(:))));
         else
             itmp = find(~any(dictionary.binding_indicator(1:length(tmp)*2,:)-tmp(:)));
-- 
GitLab