-
Notifications
You must be signed in to change notification settings - Fork 1
/
startup.m
33 lines (24 loc) · 883 Bytes
/
startup.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Add binica to Matlab's path
[path_eeglab, ~] = fileparts(which('eeglab'));
path_binica = fullfile(path_eeglab, 'binica_osx_fat');
path_environment = getenv('PATH');
path_environment = [path_environment ':' path_binica];
% Add BINICA to Unix path
setenv('PATH', path_environment);
% [status, result] = system('echo $PATH');
% Add BINICA to Matlab path
addpath(path_binica);
% Test if Binica is installed
if(exist('ica_osx') == 2) %#ok<EXIST>
display('Binica installed');
else
display('Binica not installed: INSERT REASON');
% Find why BINICA (ica_osx) not installed
[status, result] = system('ica_osx');
if(strfind(result, 'command not found'))
display(' Binica not installed');
elseif(strfind(result, 'Permission denied'))
display(' Binica not installed: Permission denied');
else
end
end