Mapping Toolbox    
km2deg, km2nm, km2rad, km2sm

Convert distance from kilometers to other units

Syntax

Description

distout = km2deg(distin) converts the input distance given in kilometers to degrees. distout = km2nm(distin), distout = km2rad(distin), and distout = km2sm(distin) perform analogously, converting to nautical miles, radians, and statute miles, respectively.

distout = km2deg(distin,radius)and distout = km2rad(distin,radius) specify the radius of the sphere to use, since a degree (or radian) of arc length covers less distance, for example, on Mars than it does on the Earth. You can enter the radius as a number in kilometers, as a call to the almanac function (e.g., almanac('mars','radius','km')), or you can pass in a string planet name (e.g., 'mars'), and the function will make the appropriate call to the almanac function. The radius of the Earth is the default.

Examples

How many miles is a 10k Run?

See Also
distdim
Convert distance units
nm2km
sm2deg
Other direct distance conversion functions


  iso2geod legs