sech

Hyperbolic secant, 1/cosh(x).

Category: Mathematics > Elementary Math

Syntax

Y = sech(X)

Returns 1./cosh(X) for each element of X.

Description

sech is a smooth bell-shaped curve with maximum value 1 at x = 0, even in x, and decaying to zero in both directions. It appears as the profile of a soliton in the nonlinear Schrodinger and Korteweg-de Vries equations, and as a heavy-tailed probability density when scaled.

Input arguments

X
Numeric array, real or complex.

Output arguments

Y
Array of the same size as X. For real input the values lie in the interval from 0 to 1.

Example

A symmetric bump

sech([-2 -1 0 1 2])
Output
ans = 1×5

    0.2658    0.6481    1.0000    0.6481    0.2658

See also

cosh sinh tanh sec asech