Main Content

deg2sm

Convert spherical distance from degrees to statute miles

Description

example

sm = deg2sm(deg) converts distances from degrees to statute miles as measured along a great circle on a sphere with a radius of 3958.748 sm, the mean radius of the Earth.

sm = deg2sm(deg,radius) converts distances from degrees to statute miles as measured along a great circle on a sphere having the specified radius.

example

sm = deg2sm(deg,sphere) converts distances from degrees to statute miles, as measured along a great circle on a sphere approximating an object in the Solar System.

Examples

collapse all

Find the circumference of the Earth in statute miles. By default, the deg2sm function assumes your input is a measurement of the Earth, which is represented as a sphere with a radius of 3958.748 statute miles.

sm = deg2sm(360)
sm = 2.4874e+04

Find the circumference of Mars in statute miles.

sm = deg2sm(360,'mars')
sm = 1.3235e+04

Input Arguments

collapse all

Distance in degrees, specified as a numeric array.

Data Types: single | double

Radius of sphere in units of statute miles, specified as a numeric scalar.

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.

Output Arguments

collapse all

Distance in statute miles, returned as a numeric array.

Data Types: single | double

Version History

Introduced in R2007a