forked from BlackrockNeurotech/NPMK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallNPMK.m
43 lines (32 loc) · 1.08 KB
/
installNPMK.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
32
33
34
35
36
37
38
39
40
41
42
43
%
% This function installs Blackrock Microsystems Neural Processing MATLAB
% Kit in MATLAB. Run "help FUNCTIONAME" to get more information about each
% function.
%
% Kian Torab
% kian@blackrockmicro.com
% Blackrock Microsystems
% Version 1.0.0.0
%
function installNPMK
disp('Removing the previous version of Neural Processing MATLAB Kit (NPMK)...');
splitPath = regexp(path, ':', 'split');
for folderIDX = 1:size(splitPath, 2)
if ~isempty(findstr(splitPath{folderIDX}, 'NPMK'))
rmpath(splitPath{folderIDX});
end
end
disp('Uninstall complete.'); pause(1);
disp('Installing Neural Processing MATLAB Kit (NPMK)...');
currentPath = what;
folderNames = dir;
folderNames(1:2) = [];
addpath(currentPath.path);
for folderIDX = 1:size(folderNames, 1)
addpath(currentPath.path);
if folderNames(folderIDX).isdir && folderNames(folderIDX).name(1) ~= '@' && folderNames(folderIDX).name(1) ~= '.'
addpath(fullfile(currentPath.path, folderNames(folderIDX).name));
end
end
savepath;
disp('Install is complete. Run "help FUNCTIONAME" to see how to use each function.');