Sin ( double angle );
Description
Returns the trigonometric sine of an angle.
Input parameters
Parameter | Default value | Description |
---|---|---|
angle | - | Defines angle (in radians) whose sine is calculated. |
Example
declare lower;
input a = 0;
input b = 10;
input periodBars = 20;
def w = 2 * Double.Pi / periodBars;
def x = CompoundValue(1, x[1] + 1, 0);
plot F = a + b * Sin(w * x);
The code draws the sine function depending on the variable which starts from one and increments by one on each bar. The cyclic frequency(w) is calculated based on the periodBars
constant.