function cos
Returns the trigonometric cosine of its argument. The returned value will be real, complex, or a matrix, depending on the argument. By default, the argument is in radians. This can be changed by specifying the switch /deg.
Syntax
result = cos(angle [, /deg])
Arguments
angle: | a number (integer, real, complex) or a matrix, specifying the angle for which the cosine is to be calculated. If X is a matrix, a matrix of the same size is returned where each element represents the result of the operation. |
Switches
/deg: | The argument is in degrees |
Examples
To find the cosine of the angle 90 degrees, type:
print cos(90, /deg)
See also
function sin
function tan
category index: trigonometry