Compute the element-wise secant of the argument.
y = sec(x)
:x Real or complex array. : :y Real or complex array. :
Compute the element-wise secant of the argument. The secant is a periodic function defined as 1/cos. For real data the results are real and in ]-%inf -1] U [1 %inf[.
x=[0 %pi/3 2*%pi/3 %pi/4 3*%pi/4 %pi/6 5*%pi/6 %pi];
sec(x)
x=`linspace`_(-%pi,%pi,100)
`plot`_(x,sec(x))
This function uses the cos function.