From e5dee169d3ec28868d81e2f746960970179e47e6 Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Tue, 17 Oct 2023 16:18:47 +0200 Subject: [PATCH] remove global CFG --- src/STEMMUS_SCOPE.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/STEMMUS_SCOPE.m b/src/STEMMUS_SCOPE.m index 515d7b3e..c576eebf 100644 --- a/src/STEMMUS_SCOPE.m +++ b/src/STEMMUS_SCOPE.m @@ -23,11 +23,12 @@ pkg load statistics io; end -% Read the configPath file. Due to using MATLAB compiler, we cannot use run(CFG) -global CFG -if isempty(CFG) +% set CFG to a path if it is not defined +if exist('CFG','var') == 0 CFG = '../config_file_crib.txt'; end + +% Read the configPath file. Due to using MATLAB compiler, we cannot use run(CFG) disp (['Reading config from ', CFG]); [InputPath, OutputPath, InitialConditionPath] = io.read_config(CFG);