Skip to content

Commit

Permalink
bug fix. strfind() behaviour changed between 2015a and 2015b
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Vincent committed Sep 24, 2016
1 parent eddd3f6 commit 27f6276
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion ddToolbox/addSubFoldersToPath.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ function addSubFoldersToPath()
end

function matchFound = isStringMatch(str,pattern)
matchFound = any(~cellfun('isempty',strfind(str,pattern)));
matchFound = any(~cellfun('isempty',strfind(str,char(pattern))));
% 2015a throws error without pattern being a char (ie need char(pattern)).
end
6 changes: 1 addition & 5 deletions ddToolbox/ddAnalysisSetUp.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ function ddAnalysisSetUp()
cd(toolboxPath)

% Add subdirectories to Matlab path
try
addSubFoldersToPath()
catch
error('Some error in adding toolbox subpaths')
end
addSubFoldersToPath()

% Ensure dependencies are installed and up-to-date.
dependencies={...
Expand Down

0 comments on commit 27f6276

Please sign in to comment.