Could you be more specific on the underlying relationship between the input (timetable) and output (mean duration)? That is, among which group are you calculating the mean duration? From your example, there are only 2 groups of destinations, i.e., BOS and NYC, but why there are 3 values in the output? What's the mapping behind? Also, your problems including Part 1, 4, 5 are all based on single test, which allows hard-coded solution to lead.
Peng do share the grouping method cause it eludes me :)
Eventually figured out the grouping method in this problem, which is not so obvious...
Make the vector [1 2 3 4 5 6 7 8 9 10]
The Hitchhiker's Guide to MATLAB
Back to basics 15 - classes
Replicate elements in vectors
Multiples of a Number in a Given Range
Use a timetable to analyze a train timetable (Part 3)
Use a timetable to analyze a train timetable (Part 1)
Use a timetable to analyze a train timetable (Part 5)
Use a timetable to analyze a train timetable (Part 2)
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office