From b0d47ac35cab25f8eb536be162ee7779aac9147c Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Wed, 28 Aug 2019 14:28:29 +0200 Subject: [PATCH] simplify writing of vspace --- src/@vspace/write.m | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/@vspace/write.m b/src/@vspace/write.m index 8471b63..d3d7a18 100644 --- a/src/@vspace/write.m +++ b/src/@vspace/write.m @@ -12,7 +12,7 @@ function o = write(o, fid) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2013-2015 Dynare Team +% Copyright (C) 2013-2019 Dynare Team % % This file is part of Dynare. % @@ -31,14 +31,8 @@ function o = write(o, fid) assert(fid ~= -1); -for i=1:o.number - fprintf(fid, ' \\par \\medskip '); -end - +fprintf(fid, repmat(' \\par \\medskip ', 1, o.number)); if o.hline > 0 - fprintf(fid, '\\\\\n'); - for i=1:o.hline - fprintf(fid, '\\midrule'); - end + fprintf(fid, ['\\\\\n' repmat('\\midrule', 1, o.hline)]); +end end -end \ No newline at end of file -- GitLab