Reference Guide > S Routines > SIN Function
  

SIN Function
Returns the sine of the input variable.
enabled.
Usage
result = SIN(x)
Input Parameters
x—The angle, in radians, that is evaluated.
Returned Value
result—The trigonometric sine of x.
Keywords
None.
Discussion
If x is of double-precision floating-point or complex data type, SIN yields a result of the same type. All other types yield a single-precision floating-point result. SIN handles complex numbers in the following way:
sin(x)complex((sin(r)cosh(i), cos(r)sinh(i))
where r and i are the real and imaginary parts of x.
If x is an array, the result of SIN has the same data type, with each element containing the sine of the corresponding element of x.
Example
The following commands produce a dampened sine wave.
x = FINDGEN(200)
PLOT, 10000 * SIN(x/5) / EXP(x/100)
See Also
COS, COSH, SINH, alibSin
For a list of other transcendental functions, see "Transcendental Mathematical Functions" in Volume 1 of this reference.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.