From e5fb0efd7b78e541d8c2b114b28ddd4d39ad2510 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Wed, 14 Feb 2018 11:47:55 +0100 Subject: [PATCH] add assert for fan option --- matlab/reporting/src/@graph/writeGraphFile.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matlab/reporting/src/@graph/writeGraphFile.m b/matlab/reporting/src/@graph/writeGraphFile.m index 3f4cd48d8..bb744126d 100644 --- a/matlab/reporting/src/@graph/writeGraphFile.m +++ b/matlab/reporting/src/@graph/writeGraphFile.m @@ -277,6 +277,8 @@ if isunix && ~ismac for i=2:ne tmp = ds{i} - ds{i-1}; idx = find(tmp.data ~= 0); + assert(~isempty(idx), ... + 'Problem creating fan area for data provided. Please check your data.'); split = ds(ds.dates(idx)); end idx = find(ds.dates == split.dates(1));