# sec

computes the element-wise secant of the argument

## Calling Sequence

    y = sec(x)

## Arguments

x

  a real or complex array.

y

  a real or complex array.

## Description

The `sec` function computes the element-wise secant of the argument. The secant is a periodic function defined as 1/\cos(x). For real data the results are real and in ]-\infty -1] \cup [1 \infty[.

## Sample

x=linspace(-%pi,%pi,100) plot(x,sec(x))

## Examples

    x=[0 %pi/3 2*%pi/3 %pi/4 3*%pi/4 %pi/6 5*%pi/6 %pi];
    sec(x)
    x=linspace(-%pi,%pi,100)
    plot(x,sec(x))

## See Also

- cos
- secd

## Used Functions

This function uses the cos function.