From b5231c1ebe2b43b23b5fdc05ba3b645331afcb39 Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Wed, 31 Jul 2024 21:20:43 -0400 Subject: [PATCH] Replace regex with strcompare --- workflow/apps/matlab/easy/EASYconsole.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/workflow/apps/matlab/easy/EASYconsole.m b/workflow/apps/matlab/easy/EASYconsole.m index 77a76a6c..0b4bf493 100644 --- a/workflow/apps/matlab/easy/EASYconsole.m +++ b/workflow/apps/matlab/easy/EASYconsole.m @@ -76,7 +76,12 @@ function varargout = EASYconsole(varargin) if exist(d, 'dir') subDirs=dir(d); pattern='^\d{6}_.*_.*'; - matchedDirs={dirs(regexp(subDirs.name, pattern)).name}; + for i=1:length(subDirs) + if ~isempty(strmatch(subDirs(i).name, pattern)) + matchedDirs{end+1}=subDirs(i).name; + end + end + whos if ~isempty(matchedDirs) fprintf('Found a non-empty scans directory in our list: %s\n', d); fprintf('Setting scansDir to %s\n', char(d));