deg = km2deg(km)
converts distances from kilometers to degrees, as measured along a great circle on a
sphere with a radius of 6371 km, the mean radius of the Earth.
deg = km2deg(km,radius)
converts distances from kilometers to degrees, as measured along a great circle on a
sphere having the specified radius.
deg = km2deg(km,sphere)
converts distances from kilometers to degrees, as measured along a great circle on a
sphere approximating an object in the Solar System.
Examples
Convert Kilometers to Degrees
Two cities are 340 km apart. How many degrees of arc is that?
deg = km2deg(340)
deg =
3.0577
How many degrees would it be if the cities were on Mars?
Sphere approximating an object in the Solar System, specified as one of the following
values: 'sun', 'moon',
'mercury', 'venus',
'earth', 'mars', 'jupiter',
'saturn', 'uranus',
'neptune', or 'pluto'. The value of
sphere is case-insensitive.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.