-
- Downloads
Project 'Dynare/reporting' was moved to 'Archives/reporting'. Please update any links and bookmarks that may still have the old path.
add basic functionality for tables with non time series data
Showing
- src/@report/addData.m 45 additions, 0 deletionssrc/@report/addData.m
- src/@report_data/display.m 32 additions, 0 deletionssrc/@report_data/display.m
- src/@report_data/printData.m 47 additions, 0 deletionssrc/@report_data/printData.m
- src/@report_data/report_data.m 76 additions, 0 deletionssrc/@report_data/report_data.m
- src/@report_data/subsasgn.m 42 additions, 0 deletionssrc/@report_data/subsasgn.m
- src/@report_data/subsref.m 46 additions, 0 deletionssrc/@report_data/subsref.m
- src/@report_data/writeDataForTable.m 119 additions, 0 deletionssrc/@report_data/writeDataForTable.m
- src/@report_table/addData.m 22 additions, 0 deletionssrc/@report_table/addData.m
- src/@report_table/report_table.m 7 additions, 1 deletionsrc/@report_table/report_table.m
- src/@report_table/writeTableFile.m 144 additions, 113 deletionssrc/@report_table/writeTableFile.m
src/@report/addData.m
0 → 100644
src/@report_data/display.m
0 → 100644
src/@report_data/printData.m
0 → 100644
function o = printData(o, fid, data, precision) | ||
%function printData(o, fid, dser, precision) | ||
% function to print a row of data, contained in data | ||
% | ||
% INPUTS | ||
% fid [int] file id | ||
% data [string] value to be printed | ||
% dates [dates] dates for report_series slice | ||
% precision [float] precision with which to print the data | ||
% | ||
% | ||
% OUTPUTS | ||
% o [report_series] report_series object | ||
% | ||
% SPECIAL REQUIREMENTS | ||
% none | ||
% Copyright (C) 2019 Dynare Team | ||
% | ||
% This file is part of Dynare. | ||
% | ||
% Dynare is free software: you can redistribute it and/or modify | ||
% it under the terms of the GNU General Public License as published by | ||
% the Free Software Foundation, either version 3 of the License, or | ||
% (at your option) any later version. | ||
% | ||
% Dynare is distributed in the hope that it will be useful, | ||
% but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
% GNU General Public License for more details. | ||
% | ||
% You should have received a copy of the GNU General Public License | ||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. | ||
dataString = sprintf('%%.%df', precision); | ||
precision = 10^precision; | ||
data = setDataToZeroFromZeroTol(o, data); | ||
for i=1:size(data,1) | ||
fprintf(fid, '&'); | ||
output = round(data(i)*precision)/precision; | ||
|
||
if isnan(output) | ||
fprintf(fid, '%s', o.tableNaNSymb); | ||
else | ||
fprintf(fid, dataString, output); | ||
end | ||
end | ||
end |
src/@report_data/report_data.m
0 → 100644
src/@report_data/subsasgn.m
0 → 100644
src/@report_data/subsref.m
0 → 100644
src/@report_data/writeDataForTable.m
0 → 100644
src/@report_table/addData.m
0 → 100644