To find the distance between points in matlab, you can use the pdist2 function. Here is an example:
main.m212 chars10 lines
To select the longest two lines, you can use the sort function to sort the lines by their length, and then select the first two. Here is an example:
main.m435 chars15 lines
gistlibby LogSnag