tan, tanh

Purpose

Tangent and hyperbolic tangent.

Synopsis

Y = tan(X)
Y = tanh(X)

Description

The trigonometric functions operate element-wise on matrices. Their domains and ranges include complex values. All angles are measured in radians.

tan(X) is the circular tangent of each element of X.

tanh(X) is the hyperbolic tangent of each element of X.

Examples

tan(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

acos, asin, atan, cos, exp, expm, funm, sin

(c) Copyright 1994 by The MathWorks, Inc.