forked from pavelbrodskiy/intercellular_calcium_wave_toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepareWorkspace.m
More file actions
30 lines (25 loc) · 851 Bytes
/
prepareWorkspace.m
File metadata and controls
30 lines (25 loc) · 851 Bytes
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
% Run this at the beginning of each calcium wave analysis script.
% This identifies the dependancy folders, and sets folders for
% inputs and output, and creates them if they do not exist.
%
% prepareWorkspace()
function settings = prepareWorkspace(varargin)
% Clear off the workspace
tic;
close all
fclose('all');
settings = getSettings();
cd(settings.activeDir);
% Delete temporary directory if it exists
if exist(settings.tmp, 'dir') %check only for folders
rmdir(settings.tmp, 's'); %removes folder and all its subfolders
end
% Compile mexs (RUN ONCE ONLY)
if false && ~exist([settings.depExt 'MinMaxFilterFolder' filesep 'lemire_engine.mexw64'])
mex([settings.depExt 'imgaussian.c'], '-v')
cd([settings.depExt 'MinMaxFilterFolder' filesep])
minmaxfilter_install
cd(settings.activeDir);
end
disp('Workspace prepared');
end