FreeMat
TANH Hyperbolic Tangent Function

Section: Mathematical Functions

Usage

Computes the hyperbolic tangent of the argument. The syntax for its use is

   y = tanh(x)

Internals

The tanh function is computed from the formula

\[ \tanh(x) = \frac{\sinh(x)}{\cosh(x)} \]

Examples

Here is a simple plot of the hyperbolic tangent function

--> x = linspace(-5,5);
--> plot(x,tanh(x)); grid('on');
tanhplot.png