Synchronize time series (fints) error

1 次查看(过去 30 天)
Hi! How can I fix an error, which appears during trying to synchronize two time series objects? I have created two time series objects: tsobj1 and tsobj2. After that using:
[ts1 ts2] = synchronize(tsobj1,tsobj2,'union')
and getting error: Undefined function 'synchronize' for input arguments of type 'fints'. Also tried [ts11 ts22] = synchronize(tsobj1,tsobj2,'intersection') - the same problem.
Can't get what I'm doing wrong.
  2 个评论
Andrei Bobrov
Andrei Bobrov 2017-8-1
Hi Sugar! Please attach your data's example (mat - file).
Caxap Puc
Caxap Puc 2017-8-2
Having issue with uploading mat, so find attached original CSV files. Made uploading of data manually to diminish possibility of errors, however can't force 'synchronize' to work.
Simple code to prepare data:
Last1 = round(Last(2:end),2);
Time1 = datenum(Time(2:end));
tsobj1 = fints(Time1, Last1);
Last2 = round(Last22(2:end),3);
Time2 = datenum(Time22(2:end));
tsobj2 = fints(Time2, Last2);
%tried different ways to synchronize
[ts1 ts2] = synchronize(tsobj1,tsobj2,'union');
[ts11 ts22] = synchronize(tsobj1,tsobj2,'intersection');

请先登录,再进行评论。

采纳的回答

Andrei Bobrov
Andrei Bobrov 2017-8-2
T1 = readtable('cem19_price-history-07-23-2017.csv', 'DatetimeType','text');
T2 = readtable('cem19_price-history-07-23-2017.csv', 'DatetimeType','text');
T1.Time = datetime(T1.Time,'I','MM/dd/yy','F','yyyy-MM-dd');
T2.Time = datetime(T2.Time,'I','MM/dd/yy','F','yyyy-MM-dd');
TT1 = table2timetable(T1);
TT2 = table2timetable(T2);
TT = synchronize(TT1,TT2);
  1 个评论
Caxap Puc
Caxap Puc 2017-8-3
Thanks for solution using time tables. I'm just curious why I can't use fints synchronization solution. Interesting what is the nature of error "Undefined function 'synchronize' for input arguments of type 'fints'". It seems like fints functions are created for time series work.

请先登录,再进行评论。

更多回答(0 个)

类别

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