Efficiency change related to the path definition.

parent 13d59723
......@@ -15,49 +15,53 @@ end
% Get the path to the dseries toolbox.
dseries_src_root = strrep(which('initialize_dseries_toolbox'),'initialize_dseries_toolbox.m','');
% Add some subfolders to the path.
addpath([dseries_src_root '/read'])
addpath([dseries_src_root '/utilities/is'])
addpath([dseries_src_root '/utilities/str'])
addpath([dseries_src_root '/utilities/x13'])
addpath([dseries_src_root '/utilities/insert'])
addpath([dseries_src_root '/utilities/file'])
addpath([dseries_src_root '/utilities/from'])
addpath([dseries_src_root '/utilities/print'])
addpath([dseries_src_root '/utilities/variables'])
addpath([dseries_src_root '/utilities/cumulate'])
% Set the subfolders to be added in the path.
p = {'/read'; ...
'/utilities/is'; ...
'/utilities/str'; ...
'/utilities/x13'; ...
'/utilities/insert'; ...
'/utilities/file'; ...
'/utilities/from'; ...
'/utilities/print'; ...
'/utilities/variables'; ...
'/utilities/cumulate'};
% Add missing routines if dynare is not in the path
if ~exist('demean','file')
addpath([dseries_src_root '/utilities/missing/demean'])
p{end+1} = '/utilities/missing/demean';
end
if ~exist('ndim','file')
addpath([dseries_src_root '/utilities/missing/ndim'])
p{end+1} = '/utilities/missing/ndim';
end
if ~exist('sample_hp_filter','file')
addpath([dseries_src_root '/utilities/missing/sample_hp_filter'])
p{end+1} = '/utilities/missing/sample_hp_filter';
end
if ~exist('get_file_extension','file')
addpath([dseries_src_root '/utilities/missing/get_file_extension'])
p{end+1} = '/utilities/missing/get_file_extension';
end
if isoctave && ~exist('user_has_octave_forge_package','file')
addpath([dseries_src_root '/utilities/missing/user_has_octave_forge_package'])
p{end+1} = '/utilities/missing/user_has_octave_forge_package';
end
if ~exist('get_cells_id','file')
addpath([dseries_src_root '/utilities/missing/get_cells_id'])
p{end+1} = '/utilities/missing/get_cells_id';
end
if ~exist('randomstring','file')
addpath([dseries_src_root '/utilities/missing/randomstring'])
p{end+1} = '/utilities/missing/randomstring';
end
% Install X13 binaries
opath = pwd();
cd([dseries_src_root '/../externals/x13'])
installx13();
cd(opath);
\ No newline at end of file
cd(opath);
% Set path
P = cellfun(@(c)[dseries_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