diff --git a/activate_matconvnet.m b/activate_matconvnet.m index 3053d9c..81a4f0a 100644 --- a/activate_matconvnet.m +++ b/activate_matconvnet.m @@ -4,13 +4,7 @@ pluginpath = fileparts(which('pop_iclabel')); % activate matconvnet -folder = fullfile(pluginpath, 'matconvnet', 'matlab', 'mex'); -path_cell = regexp(path, pathsep, 'split'); -if ispc % Windows is not case-sensitive - flag = ~any(strcmpi(folder, path_cell)); -else - flag = ~any(strcmp(folder, path_cell)); +if ~exist(['vl_nnconv.', mexext()], 'file') + addpath(fullfile(pluginpath, 'matconvnet', 'matlab')); + vl_setupnn(); end -if flag - run(fullfile(pluginpath, 'matconvnet', 'matlab', 'vl_setupnn')) -end \ No newline at end of file