Plot specific values from two different tables
6 views (last 30 days)
Show older comments
Sofie Petersson
on 20 Nov 2018
Commented: Sofie Petersson
on 20 Nov 2018
Hello.
I have two different tables with date (yyyy-mm-dd HH:mm) and temperature from one year. One of the tables include hourly values and the other one does not inlude all hours from the days. I want to plot the temperature from both tables but only the values that are from the same time.
Is there any way to do this?
Please tell me if you don't understand my question, maybe it is a bit messy.
0 Comments
Accepted Answer
Peter Perkins
on 20 Nov 2018
One good way to do this would be to create two timewtables, and then synchronize them. Depending on what you want your plot to look like, you might synchronize to 'hourly', or you might synchronize to the row times of the second timetable with "missing" rows.
Then it's just a matter of plotting temp against time, perhaps something like
plot(tt.Time,tt.Temp1,tt.Time,tt.Temp2)
where tt is your synchronized timetable.
More Answers (0)
See Also
Categories
Find more on Logical 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!