Azzera filtri
Azzera filtri

Add timetable with many months to another timetable with few months

2 visualizzazioni (ultimi 30 giorni)
I have two time tables like this:
cars =
1×1 timetable
Time Cars
________ ________
Sep-2019 42
bus =
1×1 timetable
Time buses
________ _______
Aug-2019 12
Sep-2019 54
Then I need to add the bottom table to the top table like this:
cars =
1×2 timetable
Time Cars buses
________ ________ _______
Sep-2019 42 54
Anyone have an idea for this?

Risposta accettata

Sean de Wolski
Sean de Wolski il 13 Set 2019
Look at synchronize it does exactly this:
tt = timetable(dateshift(datetime,'start','day'), 42, 'VariableNames',"Cars")
tt2 = timetable([dateshift(datetime,'start','day');datetime], [42;17], 'VariableNames',"Buses")
And if you want to play with this kind of thing interactively, in 19b, which shipped yesterday, you can use the join tables "Live Task".

Più risposte (0)


Scopri di più su Tables in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by