Trigonometric builtins

Trigonometric builtins perform basic trigonometric calculations. The trigonometric builtins can be useful in modeling scientific problems (for example, kinematics in two or three dimensions). They also can be helpful if you want to derive an input to the model using a periodically fluctuating signal (e.g., sine or cosine wave).

This section describes the following builtins:

ARCCOS (<expression>)

The ARCCOS builtin gives the arccosine of expression. The arccosine is the angle, in radians, whose cosine is expression. The angle will be in the range 0 to p. To convert measurement between degrees and radians, use the identity:

p (radians) = 180 (degrees).

The expression value can be either a constant or a variable.

Examples:

ARCCOS(0.5) equals 1.047 (radians)

ARCCOS(0.5)*180/p equals 60 (degrees)

ARCSIN (<expression>)

The ARCSIN builtin gives the arcsine of expression. The arcsine is the angle, in radians, whose sine is expression. The angle will be in the range -p/2 to p/2. To convert measurement between degrees and radians, use the identity:

p (radians) = 180 (degrees).

The expression value can be either a constant or a variable.

Examples:

ARCSIN(0.866) equals 1.047 (radians)

ARCSIN(0.866)*180/p equals 60 (degrees)

ARCTAN(<expression>)

The ARCTAN builtin gives the arctangent of expression. The arctangent is the angle, in radians, whose tangent is expression. The angle will be in the range -p/2 to p/2. To convert measurement between degrees and radians, use the identity:

p (radians) = 180 (degrees).

The expression value can be either a constant or a variable.

Examples:

ARCTAN(1) equals 0.785 (p/4) (radians)

ARCTAN(1)*180/p equals 45 (degrees)

COS(<radians>)

The COS builtin gives the cosine of radians, where radians is an angle in radians. To convert measurement between degrees and radians, use the identity:

p (radians) = 180 (degrees).

The radians value can be either a constant or a variable.

Examples:

COS(1.047) equals 0.5

COS(60*(p/180)) equals 0.5

PI

The PI builtin gives the number 3.14159..., an approximation of the constant Π.

Example:

10*SIN(2*PI*TIME/12)

generates a sinusoidal fluctuation with an amplitude of 10 and a period of 12. See also SIN and COS (see Trigonometric builtins ).

SIN(<radians>)

The SIN builtin gives the sine of radians, where radians is an angle in radians. To convert measurement between degrees and radians, use the identity:

p (radians) = 180 (degrees).

The radians value can be either a constant or a variable.

Examples:

SIN(1.047) equals 0.866

SIN(60*p/180) equals 0.866

sin_wave = 10*SIN(2*p*TIME/12) generates a sinusoidal fluctuation with an amplitude of 10 and a period of 12, as shown in the following figure.

TAN(<radians>)

The TAN builtin gives the tangent of radians, where radians is an angle in radians. To convert measurement between degrees and radians, use the identity:

p (radians) = 180 (degrees).

The radians value can be either a constant or a variable.

Examples:

TAN(0.785) equals 1

TAN(45*p/180) equals 1

Concept Link IconSee Also