table to timetable conversion problems

1 visualización (últimos 30 días)
roberto
roberto el 1 de Jul. de 2023
Comentada: roberto el 1 de Jul. de 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

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 1 de Jul. de 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 comentario
roberto
roberto el 1 de Jul. de 2023
tks very much Cris LaPierre! now works perfectly

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by