cos

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

Syntax

R = cos(a)

Inputs

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

Outputs

R
scalar | vector | matrix

Examples

Scalar input:
R = cos(pi/3)
R = 0.5
Matrix input:
R = cos([pi/6, -pi/4; -pi/3, pi/2])
R = [Matrix] 2 x 2
  8.66025e-01  7.07107e-01
  5.00000e-01  6.12323e-17