diff --git a/matlab/reporting/@table/table.m b/matlab/reporting/@table/table.m index 9b29833fe240ac2bad23246e31f16e35ff56b030..06928859894b5890df9c51e813cd01fc0c3e9e4a 100644 --- a/matlab/reporting/@table/table.m +++ b/matlab/reporting/@table/table.m @@ -40,6 +40,7 @@ o.footnote = ''; o.config = ''; o.hlines = false; o.vlines = false; +o.vline_after = ''; o.data = ''; o.seriestouse = ''; @@ -81,11 +82,15 @@ assert(isint(o.precision), '@table.table: precision must be an int'); assert(isempty(o.range) || (isa(o.range, 'dynDates') && o.range.ndat >= 2), ... ['@table.table: range is specified as a dynDates range, e.g. ' ... '''dynDates(''1999q1''):dynDates(''1999q3'')''.']); -assert(isempty(o.data) || isa(o.data, 'dynSeries'), ['@table.table: data must ' ... - 'be a dynSeries']); -assert(isempty(o.seriestouse) || iscellstr(o.seriestouse), ['@table.table: ' ... - 'seriestouse must be a cell array of string(s)']); - +assert(isempty(o.data) || isa(o.data, 'dynSeries'), ... + '@table.table: data must be a dynSeries'); +assert(isempty(o.seriestouse) || iscellstr(o.seriestouse), ... + '@table.table: seriestouse must be a cell array of string(s)'); +assert(isempty(o.vline_after) || isa(o.vline_after, 'dynDate'), ... + '@table.table: vline_after must be a dynDate'); +if o.vlines + o.vline_after = ''; +end valid_title_sizes = {'Huge', 'huge', 'LARGE', 'Large', 'large', 'normalsize', ... 'small', 'footnotesize', 'scriptsize', 'tiny'}; assert(any(strcmp(o.title_size, valid_title_sizes)), ... diff --git a/matlab/reporting/@table/write.m b/matlab/reporting/@table/write.m index c12348afe6244f2721515867d0429d5aad92a64c..9f9e3f9fa92788dfba261c412aca7b13996dd211 100644 --- a/matlab/reporting/@table/write.m +++ b/matlab/reporting/@table/write.m @@ -59,6 +59,11 @@ for i=1:ndates fprintf(fid, '|'); end fprintf(fid, 'r'); + if ~isempty(o.vline_after) + if dates(i) == o.vline_after + fprintf(fid, '|'); + end + end end fprintf(fid, '@{}}%%\n'); if ~isempty(o.title)