This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Inverse secant in radians


Y = asec(X)



Y = asec(X) returns the Inverse Secant (sec-1) of the elements of X in radians. The function accepts both real and complex inputs.

  • For real values of X in the interval [-∞, -1] and [1, ∞], asec(X) returns values in the interval [0, π].

  • For real values of X in the interval (-1, 1) and for complex values of X, asec(X) returns complex values.


collapse all

Find the inverse secant of a value.

ans = 1.9360

Find the inverse secant of the elements of vector x. The asec function acts on x element-wise.

x = [0.5i 1+3i -2.2+i];
Y = asec(x)
Y = 1×3 complex

   1.5708 + 1.4436i   1.4749 + 0.2970i   1.9503 + 0.1833i

Plot the inverse secant function over the intervals -5x-1 and 1x5.

x1 = -5:0.01:-1;
x2 = 1:0.01:5;
hold on
grid on

Input Arguments

collapse all

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

Data Types: single | double
Complex Number Support: Yes

More About

collapse all

Inverse Secant

The inverse secant is defined as


Extended Capabilities

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

See Also

| | |

Introduced before R2006a