diff --git a/src/initialize_dseries_class.m b/src/initialize_dseries_class.m index 4a276fd7663560a508d626f11ba2e4e152d6ddb4..9e702f5a889904ec95c29827bf9dbcec5f0d040d 100644 --- a/src/initialize_dseries_class.m +++ b/src/initialize_dseries_class.m @@ -1,6 +1,6 @@ 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 % it under the terms of the GNU General Public License as published by @@ -16,7 +16,11 @@ function initialize_dseries_class() % along with Dynare. If not, see <http://www.gnu.org/licenses/>. % 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. p = {'read'; ... @@ -58,7 +62,7 @@ if ~exist('ndim','file') p{end+1} = 'utilities/missing/ndim'; end -if ~exist('OCTAVE_VERSION') && (~exist('rows','file') || ~exist('columns','file')) +if ~exist('OCTAVE_VERSION') && isstandalone p{end+1} = 'utilities/missing/dims'; end