Hello,
Im would like to write a code giving the longest path between a series of points but I'm not sure where to start.
If I have points 1, 2, 3 & 4 with distances between shown in the matrix, how would I go about finding the longest path between these points? I'm fairly sure it would simply be 1-2-3-4 but is it possible to show this in matlab?
Thanks!
x, 1 ,2, 3, 4 1,0,20,12,23 2,20,0,23,15 3,12,23,0,18 4,23,15,18,0 a = [x,1,2,3,4;1,0,20,12,23;2,20,0,23,15;3,12,23,0,18;4,23,15,18,0]
Best Answer