Hello, so I am running into a brick wall over and over again trying to solve this part of a problem.
I have a matrix of different coordinates where the first row is the x-coordinate and the second row is the y-coordinate as listed here:
coord = [0 10 20 10 -20;0 0 10 20 -40]; This makes coordinate 1 =(0,0), coordinate 2 = (10,0), coordinate 3 = (20,10), and so on.
I know what the distance formula is, my struggle resides in how to get a matrix where every coordinate combination has its distance calculated, so if you looked at the distance matrix (I'll call it distMatrix) each element is the distance between its first coordinate number (the number of the row its in) and the second coordinate number (the number of the column it is in).
This would be so that distMatrix(2,3) is the distance between coordinate 2 and coodinate 3, or distMatrix(4,4) is the distance between coordinate 4 and coordinate 4 (which would be zero).
I greatly appreciate any help or guidance on this question