Efficiency change related to the path definition.

parent 43a0c5d6
% Get the path to the dates/src folder.
dates_src_root = strrep(which('initialize_dates_toolbox'),'initialize_dates_toolbox.m','');
% Add some subfolders to the path.
addpath([dates_src_root '/utilities/is'])
addpath([dates_src_root '/utilities/op'])
addpath([dates_src_root '/utilities/convert'])
% Set the subfolders to be added in the path.
p = {'/utilities/is'; ...
'/utilities/op'; ...
'/utilities/convert'};
% Add missing routines if dynare is not in the path
if ~exist('isint','file')
addpath([dates_src_root '/utilities/missing/isint'])
p{end+1} = '/utilities/missing/isint';
end
if ~exist('isoctave','file')
addpath([dates_src_root '/utilities/missing/isoctave'])
p{end+1} = '/utilities/missing/isoctave';
end
if ~isoctave && (~exist('rows','file') || ~exist('columns','file'))
addpath([dates_src_root '/utilities/missing/dims'])
p{end+1} = '/utilities/missing/dims';
end
if ~exist('shiftS','file')
addpath([dates_src_root '/utilities/missing/shiftS'])
p{end+1} = '/utilities/missing/shiftS';
end
if ~exist('matlab_ver_less_than','file')
addpath([dates_src_root '/utilities/missing/matlab_ver_less_than'])
end
\ No newline at end of file
p{end+1} = '/utilities/missing/matlab_ver_less_than';
end
% Set path
P = cellfun(@(c)[dates_src_root(1:end-1) c], p, 'uni', false);
addpath(P{:});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment