table to timetable conversion problems

1 vue (au cours des 30 derniers jours)
roberto
roberto le 1 Juil 2023
Commenté : roberto le 1 Juil 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

Réponse acceptée

Cris LaPierre
Cris LaPierre le 1 Juil 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 commentaire
roberto
roberto le 1 Juil 2023
tks very much Cris LaPierre! now works perfectly

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by