sec, sech

Purpose

Secant and hyperbolic secant.

Synopsis

Y = sec(X)
Y = sech(X)

Description

sec and sech operate element-wise on matrices. Their domains and ranges include complex values. All angles are in radians.

sec(X) is a matrix the same size as X containing the secant of the elements of X.

sech(X) is a matrix the same size as X containing the hyperbolic secant of the elements of X.

Examples

sec(pi/2) = 1.6332e+16 is not infinite, but rather a value the size of the reciprocal of the floating point accuracy eps, because pi is only a floating-point approximation to the exact value.

Algorithm

See Also

asec, asech

(c) Copyright 1994 by The MathWorks, Inc.