function lagts not supported?
1 次查看(过去 30 天)
显示 更早的评论
I'm trying to lag a timeseries, but neither command of lagts or lagmatrix is working.
I have a timeseries called d4. Here is an example of the timeseries which I generated by executing
tsd4 = timeseries(d4,time);
'06-Jan-2010 00:00:00' 0.10000
'07-Jan-2010 00:00:00' 0.10500
'08-Jan-2010 00:00:00' 0.10500
'11-Jan-2010 00:00:00' 0.12000
'12-Jan-2010 00:00:00' 0.12000
'13-Jan-2010 00:00:00' 0.13000
'14-Jan-2010 00:00:00' 0.18000
'15-Jan-2010 00:00:00' 0.16000
'19-Jan-2010 00:00:00' 0.15500
'20-Jan-2010 00:00:00' 0.16000
When I execute
tsd4_1 = lagts(tsd4,1);
I get the error message _ Undefined function 'lagts' for input arguments of type 'timeseries'._
When I execute
tsd4_1 = lagmatrix(tsd4,1);
I get the error message
_ *The following error occurred converting from timeseries to double: Error using double Conversion to double from timeseries is not possible.
Error in lagmatrix (line 92) YLag((L + 1):end,columns) = Y(1:(end - L), :);*_
0 个评论
回答(1 个)
Walter Roberson
2016-2-16
You might not have the Financial Toolbox installed, or it might not be licensed. What is shown for
which -all lagts
?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!