give more space to columns printed by dyn_table

time-shift
Houtan Bastani 2019-12-02 15:32:38 +01:00
parent 85767cfb19
commit 196266cbe4
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ function dyn_table(title, preamble, afterward, rows, cols, indent, data)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2017 Dynare Team
% Copyright (C) 2017-2019 Dynare Team
%
% This file is part of Dynare.
%
@ -53,7 +53,7 @@ colrow = sprintf('%s', colbegin);
colrow2 = colrow;
format = [' %-' num2str(maxrowstrlen) 's'];
for i = 1:length(cols)
precision = 12;
precision = 16;
if colstrlens(i) < precision
colrow = [colrow repmat(' ', 1, floor((precision-mod(colstrlens(i), precision))/2)) cols{i} repmat(' ', 1, ceil((precision-mod(colstrlens(i), precision))/2))];
colrow2 = [colrow2 repmat('_', 1, precision)];
@ -66,7 +66,7 @@ for i = 1:length(cols)
colrow = [colrow repmat(' ', 1, indent)];
colrow2 = [colrow2 repmat(' ', 1, indent)];
end
format = [format repmat(' ', 1, indent) '%' sprintf('%d.5f', precision)];
format = [format repmat(' ', 1, indent) '%' sprintf('%d.5g', precision)];
end
% Center title