Commit 8319399b authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: bug fix for when a series doesn’t have a data option passed to it

parent b3c47556
......@@ -18,6 +18,10 @@ function dd = getRange(o)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(~isempty(o.data) && size(o.data, 2) == 1);
dd = o.data.dates;
if isempty(o.data)
dd = dates();
else
assert(size(o.data, 2) == 1);
dd = o.data.dates;
end
end
\ No newline at end of file
......@@ -23,12 +23,14 @@ ddmax = dates();
ne = length(cellser);
for i=1:ne
ddt = cellser{i}.getRange();
if isempty(ddmin)
ddmin = ddt(1);
ddmax = ddt(end);
else
ddmin = min(ddt(1), ddmin);
ddmax = max(ddt(end), ddmax);
if ~isempty(ddt)
if isempty(ddmin)
ddmin = ddt(1);
ddmax = ddt(end);
else
ddmin = min(ddt(1), ddmin);
ddmax = max(ddt(end), ddmax);
end
end
end
dd = ddmin:ddmax;
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment