sec

Returns the secant for each element of the argument (in radians).

Syntax

R = sec(a)

Inputs

a
The angle in radians.
Dimension: scalar | vector | matrix

Outputs

R
scalar | vector | matrix

Examples

Scalar input:
R = sec(pi/3)
R = 2
Matrix input:
R = sec([pi/6, -pi/4; -pi/3, pi/2])
R = [Matrix] 2 x 2
  1.15470e+00  1.41421e+00
  2.00000e+00  1.63312e+16