Add timetable with many months to another timetable with few months
5 views (last 30 days)
Show older comments
Commented: Martin on 13 Sep 2019
I have two time tables like this:
Then I need to add the bottom table to the top table like this:
Time Cars buses
________ ________ _______
Sep-2019 42 54
Anyone have an idea for this?
Sean de Wolski on 13 Sep 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".
More Answers (0)
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!