diff --git a/src/initialize_dseries_class.m b/src/initialize_dseries_class.m index 154814549a433195b33465d583491f13826ecb20..a58c81763d7c044e896b76f851a013da0ea85e1b 100644 --- a/src/initialize_dseries_class.m +++ b/src/initialize_dseries_class.m @@ -112,8 +112,20 @@ if ~exist('one_sided_hp_filter','file') p{end+1} = 'utilities/missing/one_sided_hp_filter'; end +if ~exist('OCTAVE_VERSION') && ~exist('ismatrix','file') + p{end+1} = 'utilities/missing/ismatrix'; +end + +if ~exist('OCTAVE_VERSION') && ~exist('isrow','file') + p{end+1} = 'utilities/missing/isrow'; +end + +if ~exist('OCTAVE_VERSION') && ~exist('iscolumn','file') + p{end+1} = 'utilities/missing/iscolumn'; +end + % Set path P = cellfun(@(c)[dseries_src_root c], p, 'uni', false); addpath(P{:}); -assignin('caller', 'dseries_src_root', dseries_src_root); \ No newline at end of file +assignin('caller', 'dseries_src_root', dseries_src_root); diff --git a/src/utilities/missing/iscolumn/iscolumn.m b/src/utilities/missing/iscolumn/iscolumn.m new file mode 100644 index 0000000000000000000000000000000000000000..0264efe198287e63a59ace53cd068b8376ceefda --- /dev/null +++ b/src/utilities/missing/iscolumn/iscolumn.m @@ -0,0 +1,20 @@ +function r = iscolumn(V) +% Copyright (C) 2018 Dynare Team +% +% This file is part of Dynare. +% +% Dynare is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% Dynare is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with Dynare. If not, see <http://www.gnu.org/licenses/>. + +sz = size(V); +r = (length(sz) == 2) && (sz(2) == 1); diff --git a/src/utilities/missing/ismatrix/ismatrix.m b/src/utilities/missing/ismatrix/ismatrix.m new file mode 100644 index 0000000000000000000000000000000000000000..e9ed4ef2dbab191420bc7fa851e6aba8744f8de3 --- /dev/null +++ b/src/utilities/missing/ismatrix/ismatrix.m @@ -0,0 +1,19 @@ +function r = ismatrix(V) +% Copyright (C) 2018 Dynare Team +% +% This file is part of Dynare. +% +% Dynare is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% Dynare is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with Dynare. If not, see <http://www.gnu.org/licenses/>. + +r = (ndims(V) == 2); diff --git a/src/utilities/missing/isrow/isrow.m b/src/utilities/missing/isrow/isrow.m new file mode 100644 index 0000000000000000000000000000000000000000..ef53534ede0596453d55e1d7fc36ed66499816b4 --- /dev/null +++ b/src/utilities/missing/isrow/isrow.m @@ -0,0 +1,20 @@ +function r = isrow(V) +% Copyright (C) 2018 Dynare Team +% +% This file is part of Dynare. +% +% Dynare is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% Dynare is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with Dynare. If not, see <http://www.gnu.org/licenses/>. + +sz = size(V); +r = (length(sz) == 2) && (sz(1) == 1);