diff --git a/doc/dynare.texi b/doc/dynare.texi index eb8f5a0d5a082a789c9493094ee6a88ad63ac59b..f7aff57a5290d525a8cd1ea7565501b5ca23859c 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -10485,16 +10485,11 @@ Display a solid black line at @math{y = 0}. Default: @code{false} @end table @end defmethod -@defmethod Report addTable annualAverages, data, showHlines, precision, range, seriesToUse, title, titleSize, vlineAfter, vlineAfterEndOfPeriod, showVlines +@defmethod Report addTable data, showHlines, precision, range, seriesToUse, title, titleSize, vlineAfter, vlineAfterEndOfPeriod, showVlines Adds a @code{Table} to a @code{Section}. @optionshead @table @code -@item annualAverages, @code{bool} -Compute the average over every year in the table and display it in a -column to the right of the data (one column for every year). Only -works for quarterly data. Default: @code{false} - @item data, @code{dseries} @xref{data}. diff --git a/matlab/reports/@report_series/write.m b/matlab/reports/@report_series/write.m index 6377b55d72b45c0c0303eed102e252ad77f0095b..f2a5d3c0e87f536c76b9c22bafd133c681b4a6e6 100644 --- a/matlab/reports/@report_series/write.m +++ b/matlab/reports/@report_series/write.m @@ -1,5 +1,5 @@ -function o = write(o, fid, dates, precision, yrsForAvgs) -%function o = write(o, fid, dates, precision, yrsForAvgs) +function o = write(o, fid, dates, precision) +%function o = write(o, fid, dates, precision) % Write Table Row % % INPUTS @@ -7,7 +7,6 @@ function o = write(o, fid, dates, precision, yrsForAvgs) % fid [int] file id % dates [dates] dates for report_series slice % precision [float] precision with which to print the data -% yrsForAvgs [bool] the years for which to compute averages % % % OUTPUTS @@ -62,9 +61,6 @@ if ~isempty(o.tableRowColor) end if ~isempty(o.tableSubSectionHeader) fprintf(fid, '%s', o.tableSubSectionHeader); - for i=1:size(dates)+length(yrsForAvgs) - fprintf(fid, '&'); - end fprintf(fid, '\\\\%%\n'); return; end @@ -94,26 +90,5 @@ for i=1:size(data,1) fprintf(fid, ']'); end end - -% Calculate and display annual averages -for i=1:length(yrsForAvgs) - slice = o.data(dates([num2str(yrsForAvgs(i)) 'q1']):dates([num2str(yrsForAvgs(i)) 'q4'])); - avg = sum(slice.data)/size(slice); - fprintf(fid, '&'); - if o.tableShowMarkers - if avg < -o.tableMarkerLimit - fprintf(fid, '\\color{%s}', o.tableNegColor); - elseif avg > o.tableMarkerLimit - fprintf(fid, '\\color{%s}', o.tablePosColor); - end - fprintf(fid, '['); - end - - fprintf(fid, dataString, round(avg*precision)/precision); - - if o.tableShowMarkers - fprintf(fid, ']'); - end -end fprintf(fid, '\\\\%%\n'); end diff --git a/matlab/reports/@report_table/report_table.m b/matlab/reports/@report_table/report_table.m index f336212d296464c2b6e7f7abc71906b9e151f953..e84803dce2cc97996f04dfc440c372c5a8b4cb71 100644 --- a/matlab/reports/@report_table/report_table.m +++ b/matlab/reports/@report_table/report_table.m @@ -41,8 +41,6 @@ o.showVlines = false; o.vlineAfter = ''; o.vlineAfterEndOfPeriod = false; -o.annualAverages = false; - o.data = ''; o.seriesToUse = ''; o.range = {}; @@ -75,7 +73,6 @@ end % Check options provided by user assert(ischar(o.title), '@report_table.report_table: title must be a string'); -assert(islogical(o.annualAverages), '@report_table.report_table: annualAverages must be true or false'); assert(islogical(o.showHlines), '@report_table.report_table: showHlines must be true or false'); assert(islogical(o.showVlines), '@report_table.report_table: showVlines must be true or false'); assert(isint(o.precision), '@report_table.report_table: precision must be an int'); diff --git a/matlab/reports/@report_table/write.m b/matlab/reports/@report_table/write.m index 32d1a8c1efdc87c415a3d4d0fea8ddf8c904727a..0325a74557c519c450f916004651f72ec1645e99 100644 --- a/matlab/reports/@report_table/write.m +++ b/matlab/reports/@report_table/write.m @@ -74,17 +74,7 @@ for i=1:ndates end datedata = dates.time; years = unique(datedata(:, 1)); -if o.annualAverages - yrsForAvgs = years; -else - yrsForAvgs = []; -end -for i=1:length(yrsForAvgs) - fprintf(fid, 'r'); - if o.showVlines - fprintf(fid, '|'); - end -end + fprintf(fid, '@{}}%%\n'); if ~isempty(o.title) fprintf(fid, '\\multicolumn{%d}{c}{\\%s %s}\\\\\n', ... @@ -131,9 +121,6 @@ switch dates.freq otherwise error('@report_table.write: invalid dseries frequency'); end -for i=1:length(yrsForAvgs) - fprintf(fid, ' & %d', years(i)); -end fprintf(fid, '\\\\[-2pt]%%\n'); fprintf(fid, '\\hline%%\n'); fprintf(fid, '%%\n'); @@ -141,7 +128,7 @@ fprintf(fid, '%%\n'); % Write Report_Table Data ne = o.seriesElements.numSeriesElements(); for i=1:ne - o.seriesElements(i).write(fid, dates, o.precision, yrsForAvgs); + o.seriesElements(i).write(fid, dates, o.precision); if o.showHlines fprintf(fid, '\\hline\n'); end