sec computes the element-wise secant of the argument

## Syntax

    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 `]-∞,-1] ∪ [1,∞[`.

## 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

- secd
- cos

## Used Functions

This function uses the `cos()` function.