Main Content

asech

Inverse hyperbolic secant

Description

example

Y = asech(X) returns the inverse hyperbolic secant of the elements of X. The function accepts both real and complex inputs. All angles are in radians.

Examples

collapse all

Find the inverse hyperbolic secant of the elements of vector X. The asech function acts on X element-wise.

X = [2 -3 1+2i];
Y = asech(X)
Y = 1×3 complex

   0.0000 + 1.0472i   0.0000 + 1.9106i   0.3966 - 1.3845i

Plot the inverse hyperbolic secant function over the interval 0.01x1.

x = 0.01:0.001:1;
plot(x,asech(x))
grid on
xlabel('x')
ylabel('asech(x)')

Input Arguments

collapse all

Hyperbolic secant of angle, specified as a scalar, vector, matrix, or multidimensional array. The asech operation is element-wise when X is nonscalar.

Data Types: single | double
Complex Number Support: Yes

More About

collapse all

Inverse Hyperbolic Secant

For real values x in the domain 0<x1, the inverse hyperbolic secant satisfies

sech1(x)=cosh1(1x)=log(1x+1x21).

For complex numbers z=x+iy as well as real values in the regions <z0 and 1z<, the call asech(z) returns complex results.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

| | |

Introduced before R2006a