converting table 2 timetable using timeVarName
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Antonino Cataldo
am 7 Feb. 2021
Kommentiert: Antonino Cataldo
am 7 Feb. 2021
Hi,
As the title sugguests I am trying to convert a table (originally from excel) to a time table. I'm trying to use a specific variable for RowTimes. I get the error message "row times must be datetime or duration vector".
How to a "convertor" a specfic variable to a duration vector in my original table or during data import?. Variable I want to use is a simple timestamp in seconds ( a recorder time from data acqusition software).
Thanks
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 7 Feb. 2021
A = array2table(magic(4))
T = table2timetable(A, 'RowTimes', seconds(A.Var1))
You'd probably want to remove Var1 from T if you do this.
T2 = table2timetable(A(:, 2:4), 'RowTimes', seconds(A.Var1))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!