function lagts not supported?

1 visualización (últimos 30 días)
EM
EM el 16 de Feb. de 2016
Comentada: EM el 16 de Feb. de 2016
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), :);*_

Respuestas (1)

Walter Roberson
Walter Roberson el 16 de Feb. de 2016
You might not have the Financial Toolbox installed, or it might not be licensed. What is shown for
which -all lagts
?
  1 comentario
EM
EM el 16 de Feb. de 2016
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

Iniciar sesión para comentar.

Categorías

Más información sobre Time Series en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by