I would like to plot a timeseries data with gaps where the data it equal to 0:
time={'01-Jan-2001';'02-Jan-2001';'03-Jan-2001';'04-Jan-2001';'05-Jan-2001';'06-Jan-2001';... '07-Jan-2001';'08-Jan-2001';'09-Jan-2001';'10-Jan-2001';'11-Jan-2001';'12-Jan-2001';'13-Jan-2001'};data=[1 2 3 0 5 6 0 6 7 0 7 8 9];% original timeseries:
tsOriginal=timeseries(data,time);% plot original timeseries:
figure;plot(tsOriginal)
Best Answer