Skip to content
Snippets Groups Projects
Commit 633d8818 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

clean up horzcat

parent b91c59ae
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ function o = horzcat(varargin) % --*-- Unitary tests --*-- ...@@ -8,7 +8,7 @@ function o = horzcat(varargin) % --*-- Unitary tests --*--
% OUTPUTS % OUTPUTS
% - o [dates] object containing dates defined in varargin{:} % - o [dates] object containing dates defined in varargin{:}
% Copyright (C) 2013-2015 Dynare Team % Copyright (C) 2013-2017 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
...@@ -27,14 +27,8 @@ if ~all(cellfun(@isdates,varargin)) ...@@ -27,14 +27,8 @@ if ~all(cellfun(@isdates,varargin))
error('dates:horzcat:ArgCheck','All input arguments must be dates objects.') error('dates:horzcat:ArgCheck','All input arguments must be dates objects.')
end end
n = nargin;
o = copy(varargin{1}); o = copy(varargin{1});
for i=2:nargin
if isequal(n,1)
return
end
for i=2:n
p = varargin{i}; p = varargin{i};
if isequal(o.freq,p.freq) if isequal(o.freq,p.freq)
if ~isempty(p) if ~isempty(p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment