forked from zhoupc/CNMF_E
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcnmfe_setup.m
34 lines (32 loc) · 1.12 KB
/
cnmfe_setup.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
%% add path
CNMF_dir = fileparts(which('cnmfe_setup.m'));
addpath(fullfile(CNMF_dir, 'ca_source_extraction'));
addpath(genpath(fullfile(CNMF_dir, 'ca_source_extraction', 'utilities')));
addpath(genpath(fullfile(CNMF_dir, 'ca_source_extraction', 'endoscope')));
addpath(fullfile(CNMF_dir, 'GUI'));
addpath(fullfile(CNMF_dir, 'GUI', 'gui_callbacks'));
addpath(fullfile(CNMF_dir, 'GUI', 'modules'));
addpath(fullfile(CNMF_dir, 'cnmfe_scripts'));
%% setup cvx
if isempty(which('cvx_begin.m'))
if ~exist('cvx', 'dir')
%install cvx
if ismac
cvx_url = 'http://web.cvxr.com/cvx/cvx-maci64.zip';
elseif isunix
cvx_url = 'http://web.cvxr.com/cvx/cvx-a64.zip';
elseif ispc
cvx_url = 'http://web.cvxr.com/cvx/cvx-w64.zip';
else
fprintf('Your platform is not supported by CVX\n');
return;
end
fprintf('Downloading CVX...\n');
unzip(cvx_url, CNMF_dir);
end
run(sprintf('%s%scvx%scvx_setup', CNMF_dir, filesep, filesep));
end
%% save path
%savepath();
%% deconvolution
run(fullfile(CNMF_dir, 'deconvolveCa', 'setup.m'));