Why do I get an error while plotting a Financial Time Series which includes a NaN input in the Financial Time Series Toolbox v1.1 (R12.1)?
The following lines of code cause an error in version 1.1 of the Financial Time Series Toolbox:
dailydates = (today-2000:today)';dates = unique(eomdate(year(dailydates),month(dailydates)));data = ones(size(dates)) * NaN;temp = fints(dates,data,'fts','d','NaNs');h = plot(temp,'-');
??? Error using ==> plot Vectors must be the same lengths. Error in ==> D:\Applications\MATLAB\toolbox\ftseries\ftseries\@fints\plot.m On line 177 ==> hp = plot(ftsa_dates, ftsa_plotdata, linefmt);
This error only occurs when a plotting option is selected. The following code will not cause the error:
dailydates = (today-2000:today)';dates = unique(eomdate(year(dailydates),month(dailydates)));data = ones(size(dates)) * NaN;temp = fints(dates,data,'fts','d','NaNs');h = plot(temp);
Best Answer