Filter löschen
Filter löschen

table to timetable conversion problems

3 Ansichten (letzte 30 Tage)
roberto
roberto am 1 Jul. 2023
Kommentiert: roberto am 1 Jul. 2023
the problem arises after the conversion (T=table2timetable(TICKTYPE); . I attach the sparkline of the "TICKTYPE" table preview and the succesive sparkline "T" in the timetable. the "x_BID_" column has strange horizontal lines that change the values of subsequent data processing like tt= retime(T,'regular','mean','TimeStep',seconds(10)); here the mean values are completely different from the values of "T" file.tks very much. I also attach the T file in .mat

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 1 Jul. 2023
You have only shared a subset of your data, so we are not able to reproduce the issue. However, I suspect what has happened is your timetable is creaed using time of day, and your full dataset is from multiple days. The timetable uses the time information to create the sparkline, but since your rowtimes do not include date, the data from multiple days now overlap based on time only. I suggest creating a datetime column by combining time and date, and use that as your rowtimes.
Perhaps something like this:
TICKTYPE.DT = datetime(TICKTYPE.x_DATE_,'InputFormat','yyyy.MM.dd')+TICKTYPE.x_TIME_
T = table2timetable(TICKTYPE,"RowTimes","DT")
  1 Kommentar
roberto
roberto am 1 Jul. 2023
tks very much Cris LaPierre! now works perfectly

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Time Series Events finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by