MATLAB function to calculate distance between two coordinates (latitude and longitude)
How can I calculate distance between two world map coordinates (latitude and longitude) using MATLAB R2015a (in meters)? If you don't have access to the MATLAB Mapping toolbox then a simple approximation is to use the Haversine formula. Here is an excerpt from the link: The haversine formula is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical triangles. Here is a MATLAB