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. The asec function operates element-wise on arrays. For real elements of X in the interval [-Inf,-1] and [1,Inf], asec returns values in the interval [0,pi]. For real values of X in the interval [-1,1] and for complex values of X, asec returns complex values. All angles are in radians.


collapse all

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 and .

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

Input Arguments

collapse all

Numeric input, specified as a number, vector, matrix, or multidimensional array.

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

Was this topic helpful?