add new option tablePrecision to report_series

remove-priordens
Houtan Bastani 2017-01-09 16:12:29 +01:00
parent 8118eb0c49
commit 60def33fa7
2 changed files with 10 additions and 2 deletions

View File

@ -14,7 +14,7 @@ function o = report_series(varargin)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-2016 Dynare Team
% Copyright (C) 2013-2017 Dynare Team
%
% This file is part of Dynare.
%
@ -75,6 +75,8 @@ o.tableRowIndent = 0;
o.tableDataRhs = '';
o.tableNaNSymb = 'NaN';
o.tablePrecision = '';
o.zeroTol = 1e-6;
if nargin == 1

View File

@ -17,7 +17,7 @@ function o = writeSeriesForTable(o, fid, dates, precision, ncols, rowcolor)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-2016 Dynare Team
% Copyright (C) 2013-2017 Dynare Team
%
% This file is part of Dynare.
%
@ -65,6 +65,12 @@ assert(islogical(o.tableAlignRight), '@report_series.writeSeriesForTable: tableA
assert(isfloat(o.tableMarkerLimit), '@report_series.writeSeriesForTable: tableMarkerLimit must be a float');
assert(ischar(o.tableNaNSymb), '@report_series.writeSeriesForTable: tableNaNSymb must be a string');
if ~isempty(o.tablePrecision)
assert(isint(o.tablePrecision) && o.tablePrecision >= 0, ...
'@report_series.writeSeriesForTable: tablePrecision must be a non-negative integer');
precision = o.tablePrecision;
end
%% Write Output
fprintf(fid, '%% Table Row (report_series)\n');
if ~isempty(o.tableRowColor) && ~strcmpi(o.tableRowColor, 'white')