# refractiveidx

Calculates the refractive index

## Syntax

``ridx = refractiveidx(h)``
``ridx = refractiveidx(___,Name,Value)``
``[ridx,N] = refractiveidx(___)``
``refractiveidx(___)``

## Description

````ridx = refractiveidx(h)` calculates the refractive index `ridx` at height `h` above mean sea level (MSL) using the International Telecommunication Union (ITU) standard atmospheric model.```
````ridx = refractiveidx(___,Name,Value)` calculates the refractive index with additional options specified by one or more name-value pairs.```

example

````[ridx,N] = refractiveidx(___)` additionally outputs the refractivity `N` as a row vector.```
````refractiveidx(___)` with no output arguments plots the refractive index `n` as a function of altitude in kilometers.```

## Examples

collapse all

Compute the refractive index and refractivity at a height of 20 km using the mid-latitude model during winter.

```h = 20e3; [ridx,N] = refractiveidx(h,'LatitudeModel','Mid','Season','Winter')```
```ridx = 1.0000 ```
```N = 21.1961 ```

## Input Arguments

collapse all

Geometric heights corresponding to the altitude above MSL in meters, specified as a row vector.

Data Types: `double`

### Name-Value Arguments

Specify optional pairs of arguments as `Name1=Value1,...,NameN=ValueN`, where `Name` is the argument name and `Value` is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose `Name` in quotes.

Example: `refractiveidx(h,'LatitudeModel','Mid','Season','Winter')` specifies the mid-latitude model during winter.

Standard ground-level water-vapor density in g/m3, specified as a scalar. `VaporDensity` applies only when `LatitudeModel` is set to the default `'Standard'` model.

Data Types: `double`

Scale height in meters, specified as a scalar. `ScaleHeight` applies only when `LatitudeModel` is set to the default `'Standard'` model. For a dry atmosphere, set `ScaleHeight` to 6000.

Data Types: `double`

Reference latitude model, specified as a string vector. Specify `LatitudeModel` as:

• `'Standard'`

This model is the Mean Annual Global Reference Atmosphere (MAGRA) that reflects the mean annual temperature and pressure averaged across the world.

• `'Low'`

Use this option for low latitudes less than 22°, where there exists little seasonal variation.

• `'Mid'`

Use this option for mid-latitudes between 22° and 45° that have seasonal profiles for summer and winter, which can be specified using the `Season` name-value pair.

• `'High'`

Use this option for high latitudes greater than 45° that have seasonal profiles for summer and winter, which can be specified using the `Season` name-value pair.

Seasonal profile, specified as `'Summer'` or `'Winter'`. This argument is valid only when `LatitudeModel` is set to `'Mid'` or `'High'`.

Custom atmospheric measurements for the calculation of `ridx`, specified as an N-by-4 matrix where N corresponds to the number of altitude measurements. The first column in N is the atmospheric temperature in Kelvin, the second column is the atmospheric pressure in hectopascals, the third column is the atmospheric water-vapor density in g/m3, and the fourth column is the altitude above MSL of the measurements in increasing order and specified in meters. When `AtmosphereMeasurements` is specified, all other name-value pair options are ignored and `ridx` is applicable for the input height `h`.

## Output Arguments

collapse all

Refractive index, returned as a row vector.

Refractivity, returned as a row vector.

 International Telecommunication Union (ITU). "The Radio Refractive Index: Its Formula and Refractivity Data". Recommendation ITU-R P.453-11, P Series, Radiowave Propagation, July 2015.