secd

Secant of argument in degrees

Syntax

• ``Y = secd(X)``

Description

````Y = secd(X)` returns the secant of the elements of `X`, which are expressed in degrees.```

Examples

collapse all

Secant of 90 degrees compared to secant of π/2 radians

```secd(90) ```
```ans = Inf```
```sec(pi/2) ```
```ans = 1.6331e+16```

`secd(90)` is infinite, whereas `sec(pi/2)` is large but finite.

Secant of vector of complex angles, specified in degrees

```z = [35+i 15+2i 10+3i]; y = secd(z)```
```y = 1.2204 + 0.0149i 1.0346 + 0.0097i 1.0140 + 0.0094i```

Input Arguments

collapse all

`X` — Angle in degreesscalar value | vector | matrix | N-D array

Angle in degrees, specified as a real-valued or complex-valued scalar, vector, matrix, or N-D array. The `secd` operation is element-wise when `X` is nonscalar.

Example:

Data Types: `single` | `double`
Complex Number Support: Yes

Output Arguments

collapse all

`Y` — Secant of anglescalar value | vector | matrix | N-D array

Secant of angle, returned as a real-valued or complex-valued scalar, vector, matrix, or N-D array of the same size as `X`.