Skip to content
Snippets Groups Projects
Commit 92e22403 authored by William Lövfors's avatar William Lövfors
Browse files

Fixed a small bug, since we now look for filenames containing .mat, we require >0 not >2

parent f6b1da4b
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ if useSub ...@@ -11,7 +11,7 @@ if useSub
pathToSearch=[pathToSearch '/**/*.mat']; pathToSearch=[pathToSearch '/**/*.mat'];
end end
files=dir(pathToSearch); files=dir(pathToSearch);
assert(length(files)>2,'No files to search in the provided path') assert(length(files)>0,'No files to search in the provided path')
names=string({files.name}); names=string({files.name});
files(cellfun(@isempty,regexp(names, key)))=[]; %removes all files not containing "key" files(cellfun(@isempty,regexp(names, key)))=[]; %removes all files not containing "key"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment