Problem 43666. Use a timetable to analyze a train timetable (Part 3)
Oh no, you missed your train to Boston (again?)! How many times can you miss that train today? (In other words, how many Boston trains depart on November 1, 2016?)
Example
DepTime = datetime(2016,11,1,[6 8 9],[22 51 05],0)'; ArrTime = datetime(2016,11,1,[9 10 12],[17 32 09],0)'; Destination = categorical({'BOS';'NYC';'BOS'}); tt = timetable(DepTime,Destination,ArrTime) tt = DepTime Destination ArrTime ____________________ ___________ ____________________ 01-Nov-2016 06:22:00 BOS 01-Nov-2016 09:17:00 01-Nov-2016 08:51:00 NYC 01-Nov-2016 10:32:00 01-Nov-2016 09:05:00 BOS 01-Nov-2016 12:09:00
Feature Tip: R2016b introduces timetables with related functions which may be helpful. To learn more see MATLAB Timetables.
Related Problems:
Use a timetable to analyze a train timetable (Part 1)
Use a timetable to analyze a train timetable (Part 2)
Use a timetable to analyze a train timetable (Part 3)
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers62
Suggested Problems
-
Get the area codes from a list of phone numbers
1051 Solvers
-
Project Euler: Problem 3, Largest prime factor
1404 Solvers
-
315 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
579 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1855 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!