Main Content

sm2rad

Convert spherical distance from statute miles to radians

Description

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

example

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

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

example

Examples

collapse all

Convert 500 statute miles to radians, as measured along a great circle on the Earth. By default, the sm2rad function assumes your input is a measurement of the Earth, which is represented as a sphere with a radius of 3958.748 statute miles.

rad = sm2rad(500)
rad = 
0.1263

Convert 500 statute miles to radians, as measured along a great circle on Mars.

rad = sm2rad(500,'mars')
rad = 
0.2374

Input Arguments

collapse all

Distance in statute miles, 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 radians, returned as a numeric array.

Data Types: single | double

Version History

Introduced in R2007a