function lagts not supported?

2 次查看(过去 30 天)
EM
EM 2016-2-16
评论: EM 2016-2-16
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), :);*_

回答(1 个)

Walter Roberson
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
?
  1 个评论
EM
EM 2016-2-16
Hi Walter thanks for your response. It seems as though I do have the financial toolbox, I think.
>>
which -all lagts
C:\Program Files\MATLAB\R2015a\toolbox\finance\ftseries\@fints\lagts.m % fints method

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by