Main Content

rad2nm

Convert spherical distance from radians to nautical miles

Description

example

nm = rad2nm(rad) converts distances from radians to nautical miles, as measured along a great circle on a sphere with a radius of 3440.065 nm, the mean radius of the Earth.

example

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

nm = rad2nm(rad,sphere) converts distances from radians to nautical 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 nautical miles. By default, the rad2nm function assumes your input is a measurement of the Earth, which is represented as a sphere with a radius of 3440.065 nautical miles.

nm = rad2nm(2*pi)
nm = 2.1615e+04

Find the circumference of a sphere with a radius of 3432 nautical miles.

nm = rad2nm(2*pi,3432)
nm = 2.1564e+04

Input Arguments

collapse all

Distance in radians, specified as a numeric array.

Data Types: single | double

Radius of sphere in units of nautical 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 nautical miles, returned as a numeric array.

Data Types: single | double

Version History

Introduced in R2007a