would a double for loop work?
say
for i = 2:length(Latitude);
for j = 1:length(Latitude);
dellat = Latitude(i)-Latitude(j);
dellong = Longitude(i)-Longitude(j);
end
end
and then relate dellat and dellong with the above formula to find an array for the value of d? I haven't gotten the chance to test it yet.