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...
Return the first and last character of a string
Rotate a Matrix by 90 degrees
Is X a Fibonacci Matrix?
Swap two numbers
Use a timetable to analyze a train timetable (Part 3)
Use a timetable to analyze a train timetable (Part 5)
Use a timetable to analyze a train timetable (Part 2)
Use a timetable to analyze a train timetable (Part 1)
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