-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinitialize.m
More file actions
30 lines (24 loc) · 959 Bytes
/
initialize.m
File metadata and controls
30 lines (24 loc) · 959 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
%% INITIALIZATION FILE %%
%%---------------------%%
% CALL THIS JUST ONCE PER SESSION
% somewhere in the loading procedure the global variables are cleared and
% this messes up everything so don't call it more than once
main_path = cd(fileparts(mfilename('fullpath')));
addpath(genpath(main_path));
%% Initialize the WEKA library
weka_init;
disp('Weka library now initialized. Cheers.');
%% Initialize the configuration file
global g_config;
%% Select desired configuration
g_config = config_mwm; %Morris water maze
fprintf('Configuration selected: %s\n', g_config.DESCRIPTION);
%% MATLAB version check
% Two gui versions are available, one for MATLAB 2014a and older and one
% for MATLAB 2014b and newer
v = version();
if str2num(v(1:3)) <= 8.3 % <= Matlab 2014a
rmpath(genpath(fullfile(fileparts(mfilename('fullpath')), '/extern/GUILayout/v2')));
else
rmpath(genpath(fullfile(fileparts(mfilename('fullpath')), '/extern/GUILayout/v1')));
end