secd
Secant of an angle in degrees.
Category: Mathematics > Elementary Math
Syntax
Y = secd(X)
Returns the secant of each element of X, with X in degrees.
Description
secd(x) is 1./cosd(x). Since cosd is exact at multiples of 90 degrees, secd gives exact values there, unlike sec(x*pi/180), which carries the rounding error of the conversion. For instance, secd(60) is exactly 2.
Input arguments
X- Angles in degrees.
Output arguments
Y- Array of the same size as
X. Odd multiples of 90 giveInf.
Example
Degrees directly
secd([0 45 60])
secd(90)
Output
ans = 1×3
1.0000 1.4142 2.0000
ans = Inf