tanh

Returns hyperbolic tangent of a.

Syntax

R = tanh(a)

Inputs

a
Any valid scalar | vector | matrix in radians.
Type: double | integer
Dimension: scalar | vector | matrix

Outputs

R
scalar | vector | matrix

Examples

Simple scalar input:
R = tanh(-0.5)
R = -0.462117
Simple matrix input:
R = tanh([-3,.6])
 R = [ -0.995055 0.53705 ]
Simple matrix input:
R = tanh([i+2,3i-1;i,0.3])
R = [ 1.01479 + 0.0338128i, -0.768018-0.0591685i; 1.55741i, 0.291313]