Create a vector and calculate the hyperbolic secant of each value.
X = [0 pi 2*pi 3*pi]; Y = sech(X)
Y = 1×4 1.0000 0.0863 0.0037 0.0002
Plot the hyperbolic secant over the domain .
x = -2*pi:0.01:2*pi; y = sech(x); plot(x,y) grid on
X— Input angles in radians
Input angles in radians, specified as a scalar, vector, matrix, or multidimensional array.
Complex Number Support: Yes
The hyperbolic secant of x is equal to the inverse of the hyperbolic cosine
In terms of the traditional secant function with a complex argument, the identity is
This function fully supports tall arrays. For more information, see Tall Arrays.
backgroundPoolor accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).