Convert spherical distance from 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?
deg = km2deg(340,'mars')
deg = 5.7465
km— Distance in kilometers
Distance in kilometers, specified as a numeric array.
deg— Distance in degrees
Distance in degrees, returned as a numeric array.