>> names = ["Boston"; "New York"; "Chicago"; "Los Angeles"; "Washington DC"];
>> D = digraph(names(1:end-1), names(2:end))
Add the weight information as the third input in the digraph call. If the data is in something like a transit schedule form (like this schedule from the MBTA's Framingham/Worcester commuter rail line) you may need to call diff on the arrival time data to get the duration of each leg of the trip. Since digraph weights can't be datetime or duration values, you'll want to convert the duration data to seconds, minutes, hours, etc. depending on the durations of the trips.