From e9d79796cf7ddfe483f60bc1f5773ade6cc72e34 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Wed, 27 Dec 2023 14:53:15 +0100
Subject: [PATCH] dynare.m: cosmetic changes

---
 matlab/dynare.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/matlab/dynare.m b/matlab/dynare.m
index fae2623200..6c7e4b38f3 100644
--- a/matlab/dynare.m
+++ b/matlab/dynare.m
@@ -122,7 +122,7 @@ if isempty(dot_location)
     fnamelength = length(fname);
     fname1 = [fname '.dyn'];
     d = dir(fname1);
-    if length(d) == 0
+    if isempty(d)
         fname1 = [fname '.mod'];
     end
     fname = fname1;
@@ -138,7 +138,7 @@ if fnamelength + length('.set_auxiliary_variables') > namelengthmax()
     error('Dynare: the name of your .mod file is too long, please shorten it')
 end
 
-if ~isempty(strfind(fname,filesep))
+if contains(fname,filesep)
     fprintf('\nIt seems you are trying to call a .mod file not located in the "Current Folder". This is not possible (the %s symbol is not allowed in the name of the .mod file).\n', filesep)
     [pathtomodfile,basename] = fileparts(fname);
     if exist(pathtomodfile,'dir')
-- 
GitLab