From 647ff5cd20b9e74c2a06e6eb19d51fc033e474c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 17 Mar 2023 16:03:37 +0100
Subject: [PATCH] MATLAB compatibility: warning
 subscripting:noSubscriptsSpecified removed in R2023a

---
 matlab/aggregate.m | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/matlab/aggregate.m b/matlab/aggregate.m
index ae3fc71e25..0dc3c76ab4 100644
--- a/matlab/aggregate.m
+++ b/matlab/aggregate.m
@@ -21,7 +21,9 @@ function aggregate(ofile, dynopt, rootfolder, varargin)
 
 MAX_NUMBER_OF_ELEMENTS = 10000;
 
-warning off MATLAB:subscripting:noSubscriptsSpecified
+if ~isoctave && matlab_less_ver_than('9.14') % Warning removed in R2023a
+    warning off MATLAB:subscripting:noSubscriptsSpecified
+end
 
 if ~isempty(dynopt)
     % Should be a list of options for the preprocessor in a cell
@@ -318,8 +320,9 @@ end
 fprintf(fid, 'end;');
 fclose(fid);
 
-warning on MATLAB:subscripting:noSubscriptsSpecified
-
+if ~isoctave && matlab_less_ver_than('9.14')
+    warning on MATLAB:subscripting:noSubscriptsSpecified
+end
 
 function b = isequationtag(str)
     b = true;
-- 
GitLab