Synchronize time series (fints) error

1 Ansicht (letzte 30 Tage)
Caxap Puc
Caxap Puc am 1 Aug. 2017
Kommentiert: Caxap Puc am 3 Aug. 2017
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 Kommentare
Andrei Bobrov
Andrei Bobrov am 1 Aug. 2017
Hi Sugar! Please attach your data's example (mat - file).
Caxap Puc
Caxap Puc am 2 Aug. 2017
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');

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 2 Aug. 2017
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 Kommentar
Caxap Puc
Caxap Puc am 3 Aug. 2017
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by