Mapping Toolbox    
rad2km, rad2nm, rad2sm

Convert distance from radians to kilometers, nautical miles, or statute miles

Syntax

Description

distout = rad2km(distin) converts the input distance given in radians to kilometers.

distout = rad2nm(distin)and distout = rad2sm(distin)work identically, except that the output units are nautical miles and statute miles, respectively.

distout = rad2km(distin,radius)specifies the radius of the sphere to use, since a radian of arc length covers less distance, for example, on Mars than it would 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')), again in the appropriate units, 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.

For distout = rad2nm(distin,radius)and distout = rad2sm(distin,radius) make sure your input radius is in the appropriate units, or just use the planet name string.

Examples

How long is a trip around the Equator in statute miles?

How about on Jupiter?

See Also
distdim
Convert distances between different units
nm2km
sm2deg
Other direct distance conversion functions
rad2deg
Convert radians to degrees


  rad2dms, rad2dm rc2yx