From 633d88184e100cb9c52a575abe25303697ccdb7d Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Fri, 7 Apr 2017 12:08:53 +0200
Subject: [PATCH] clean up horzcat

---
 src/@dates/horzcat.m | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/@dates/horzcat.m b/src/@dates/horzcat.m
index dca4f2f..108bf0f 100644
--- a/src/@dates/horzcat.m
+++ b/src/@dates/horzcat.m
@@ -8,7 +8,7 @@ function o = horzcat(varargin) % --*-- Unitary tests --*--
 % OUTPUTS 
 % - 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
 % it under the terms of the GNU General Public License as published by
@@ -27,14 +27,8 @@ if ~all(cellfun(@isdates,varargin))
     error('dates:horzcat:ArgCheck','All input arguments must be dates objects.')
 end
 
-n = nargin;
 o = copy(varargin{1});
-
-if isequal(n,1)
-    return
-end
-
-for i=2:n
+for i=2:nargin
     p = varargin{i};
     if isequal(o.freq,p.freq)
         if ~isempty(p)
-- 
GitLab