Closes #43.

parent 4832c0dd
function initialize_dseries_class() function initialize_dseries_class()
% Copyright (C) 2015-2019 Dynare Team % Copyright © 2015-2020 Dynare Team
% %
% This code is free software: you can redistribute it and/or modify % This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by % it under the terms of the GNU General Public License as published by
...@@ -16,7 +16,11 @@ function initialize_dseries_class() ...@@ -16,7 +16,11 @@ function initialize_dseries_class()
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Get the path to the dseries toolbox. % Get the path to the dseries toolbox.
dseries_src_root = strrep(which('initialize_dseries_class'),'initialize_dseries_class.m',''); dseries_src_root = strrep(which('initialize_dseries_class'), 'initialize_dseries_class.m', '');
% Is the dseries package used as a standalone?
dseries_src_path_s = strsplit(dseries_src_root, filesep());
isstandalone = ~isequal(dseries_src_path_s(end-3:end), {'matlab', 'modules', 'dseries', 'src'}) & isempty(which('dynare'));
% Set the subfolders to be added in the path. % Set the subfolders to be added in the path.
p = {'read'; ... p = {'read'; ...
...@@ -58,7 +62,7 @@ if ~exist('ndim','file') ...@@ -58,7 +62,7 @@ if ~exist('ndim','file')
p{end+1} = 'utilities/missing/ndim'; p{end+1} = 'utilities/missing/ndim';
end end
if ~exist('OCTAVE_VERSION') && (~exist('rows','file') || ~exist('columns','file')) if ~exist('OCTAVE_VERSION') && isstandalone
p{end+1} = 'utilities/missing/dims'; p{end+1} = 'utilities/missing/dims';
end end
......
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