Hi
For an AUV project I'm doing we need to calculate the speed from the GPS coordinates. In order to calculate the speed we need to calculate the distance between the GPS coordinates. Since there is only a short distance between the points (less than 100m) I wan't to calculate it using the Euclidean distance between the points.
The issue is I have two single row arrays (1×21) whith all the latitude and longitude coordinates from the GPS and I'm not sure how to combine the to arrays to get a new array with the distances in it? – Can I use the pdist2(X,Y) command?
I have tried with pdist2(lat,lon,'euclidean') where lat and lon is the 1×21 arrays which just returns a single number When I try with lat and lon as 21×1 array it gives me a 21×21 array – I'm not sure I completely understands the pdist2(x,y) command?
Sorry if I'm touching on something that has been discussed in here before, but I have bin searching for several hours and I have not really gotten any further…
Best regards and thanks
Best Answer