diff --git a/matlab/reporting/@graph/createGraph.m b/matlab/reporting/@graph/createGraph.m index 3d11eb9c8e9ba9bfcb60bb335286495a0f952c1a..98035a73a280489533d16dc26f85fa3bc1f2bc6e 100644 --- a/matlab/reporting/@graph/createGraph.m +++ b/matlab/reporting/@graph/createGraph.m @@ -49,10 +49,6 @@ end %set(h, 'PaperPositionMode', 'auto'); %set(h, 'units', 'normalized', 'outerposition', [0 0 1 1]); -if length(o.data) > 1 - o.data = [o.data{:}]; -end - if isempty(o.seriestouse) ds = o.data; else diff --git a/matlab/reporting/@graph/graph.m b/matlab/reporting/@graph/graph.m index 67585396e73610ffe958258cd25dd606a32b645d..56fd9518e9d0d044370a9b99f4e79afc3c754289 100644 --- a/matlab/reporting/@graph/graph.m +++ b/matlab/reporting/@graph/graph.m @@ -112,26 +112,10 @@ assert(isempty(o.yrange) || (isfloat(o.yrange) && length(o.yrange) == 2 && ... o.yrange(1) < o.yrange(2)), ... ['@graph.graph: yrange is specified an array with two float entries, ' ... 'the lower bound and upper bound.']); - -assert(~isempty(o.data), '@graph.graph: must provide data'); -msg = ['@graph.graph: data must either be a dynSeries or a cell array of ' ... - 'dynSeries']; -if length(o.data) == 1 - assert(isa(o.data, 'dynSeries'), msg); -else - assert(iscell(o.data), msg); - for i=1:length(o.data) - assert(isa(o.data{i}, 'dynSeries'), msg); - end -end - -msg = ['@graph.graph: series to use must be a cell array of string(s)']; -if ~isempty(o.seriestouse) - assert(iscell(o.seriestouse), msg); - for i=1:length(o.seriestouse) - assert(ischar(o.seriestouse{i}), msg); - end -end +assert(~isempty(o.data) && isa(o.data, 'dynSeries'), ['@graph.graph: must ' ... + 'provide data as a dynSeries']); +assert(isempty(o.seriestouse) || iscellstr(o.seriestouse), ['@graph.graph: ' ... + 'series to use must be a cell array of string(s)']); % Create graph object o = class(o, 'graph'); diff --git a/matlab/reporting/@table/table.m b/matlab/reporting/@table/table.m index 8be93205593d6a2b910de7ea4404c7f813014f63..0eb76538ae2000057fc803f57d65d38cfed175b1 100644 --- a/matlab/reporting/@table/table.m +++ b/matlab/reporting/@table/table.m @@ -78,26 +78,10 @@ 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), '@table.table: must provide data'); -msg = ['@table.table: data must either be a dynSeries or a cell array of ' ... - 'dynSeries']; -if length(o.data) == 1 - assert(isa(o.data, 'dynSeries'), msg); -else - assert(iscell(o.data), msg); - for i=1:length(o.data) - assert(isa(o.data{i}, 'dynSeries'), msg); - end -end - -msg = ['@table.table: series to use must be a cell array of string(s)']; -if ~isempty(o.seriestouse) - assert(iscell(o.seriestouse), msg); - for i=1:length(o.seriestouse) - assert(ischar(o.seriestouse{i}), msg); - end -end +assert(~isempty(o.data) && isa(o.data, 'dynSeries'), ['@table.table: must ' ... + 'provide data as a dynSeries']); +assert(isempty(o.seriestouse) || iscellstr(o.seriestouse), ['@table.table: ' ... + 'series to use must be a cell array of string(s)']); % Create table object o = class(o, 'table');