# deg2nm

Convert spherical distance from degrees to nautical miles

## Syntax

``nm = deg2nm(deg)``
``nm = deg2nm(deg,radius)``
``nm = deg2nm(deg,sphere)``

## Description

example

````nm = deg2nm(deg)` converts distances from degrees to nautical miles, as measured along a great circle on a sphere with a radius of 3440.065 nautical miles, the mean radius of the Earth.```
````nm = deg2nm(deg,radius)` converts distances from degrees to nautical miles, as measured along a great circle on a sphere having the specified radius.```
````nm = deg2nm(deg,sphere)` converts distances from degrees to nautical miles, as measured along a great circle on a sphere approximating an object in the Solar System.```

## Examples

collapse all

One degree of arc length is about 60 nautical miles, using a spherical model of the Earth.

```deg2nm(1) ```
```ans = 60.0405```

This is not true on Mercury, of course.

```deg2nm(1,'mercury') ```
```ans = 22.9852```

## Input Arguments

collapse all

Distance in degrees, 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