# atan2d

## Syntax

• `D = atan2d(Y,X)` example

## Description

example

````D = atan2d(Y,X)` returns the four-quadrant inverse tangent of points specified in the x-y plane. The result, `D`, is expressed in degrees. ```

## Examples

collapse all

### Inverse Tangent of Four Points on the Unit Circle

```x = [1 0 -1 0]; y = [0 1 0 -1]; d = atan2d(y,x)```
```d = 0 90 180 -90```

## Input Arguments

collapse all

### `Y` — y-coordinatesscalar value | vector | matrix | N-D array

y-coordinates, specified as a real-valued scalar, vector, matrix, or N-D array.

Data Types: `single` | `double`

### `X` — x-coordinatesscalar value | vector | matrix | N-D array

x-coordinates, specified as a real-valued scalar, vector, matrix, or N-D array.

Data Types: `single` | `double`

## Output Arguments

collapse all

### `D` — Angles in degreesscalar value | vector | matrix | N-D array

Angles in degrees, returned as a scalar, vector, matrix, or N-D array. These angles correspond to the points defined by `X` and `Y`, and they lie in the closed interval [–180,180].

collapse all

### Tips

• Use `atand(Y/X)` for the inverse tangent with results on the interval [–90, 90].