Skip to content
Snippets Groups Projects
Verified Commit ef923e41 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Moved +dseries/initialize.m to @dseries/initialize.m

To initialize the toolbox:

 - Add the `src` folder in the path
 - run `dseries().initialize()`

This is an Octave compatibily workaround, Octrave cannot handle
simultaneously +folder (namespace) and @folder (class).
parent f19b0931
No related branches found
No related tags found
No related merge requests found
function initialize()
function initialize(fake)
% Copyright (C) 2015-2018 Dynare Team
%
......@@ -16,7 +16,7 @@ function initialize()
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Get the path to the dseries toolbox.
dseries_src_root = strrep(which('dseries.initialize'),'+dseries/initialize.m','');
dseries_src_root = strrep(which('@dseries/initialize'),'@dseries/initialize.m','');
% Check that the x13 binary is available
nox13 = false;
......@@ -65,8 +65,7 @@ if ~exist('isint','file')
end
if ~exist('isoctave','file')
addpath([dseries_src_root 'utilities/missing/isoctave']);
%p{end+1} = 'utilities/missing/isoctave';
p{end+1} = 'utilities/missing/isoctave';
end
if ~exist('shiftS','file')
......@@ -85,7 +84,7 @@ if ~exist('ndim','file')
p{end+1} = 'utilities/missing/ndim';
end
if ~isoctave && (~exist('rows','file') || ~exist('columns','file'))
if ~exist('OCTAVE_VERSION') && (~exist('rows','file') || ~exist('columns','file'))
p{end+1} = 'utilities/missing/dims';
end
......@@ -97,7 +96,7 @@ if ~exist('get_file_extension','file')
p{end+1} = 'utilities/missing/get_file_extension';
end
if isoctave && ~exist('user_has_octave_forge_package','file')
if exist('OCTAVE_VERSION') && ~exist('user_has_octave_forge_package','file')
p{end+1} = 'utilities/missing/user_has_octave_forge_package';
end
......
......@@ -83,6 +83,8 @@ switch S(1).type
end
case 'struct'
r = dseries2struct(o);
case 'initialize'
initialize(o);
case {'baxter_king_filter', 'baxter_king_filter_', ...
'cumsum','cumsum_', ...
'insert', ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment