DADiSP Worksheet Functions > Function Categories > Trigonometric Functions > COS

 

COS

Purpose:

Calculates the cosine of any expression.

Syntax:

COS(val)

val

-

A scalar, series or table.

Returns:

A scalar, series, or table.

 

Example:

cos(-2*pi..pi/100..2*pi);gridhv;griddot

 

 

image\cospic01.gif

 

displays the cosine from -2π to 2π.

Example:

cos(pi)

 

returns -1.

Example:

cos(-2..0.1..2)

 

returns a 41 point series.

Example:

t = 0..0.01..1

cos(2*pi*10*t)

 

returns a 101 point series of a 10 Hertz cosine sampled at 100 samples per second. This is equivalent to:

 

gcos(101, 0.01, 10)

Remarks:

The cosine is defined as:

 

image\cos01.gif

 

for all complex z.

 

The function calculates in radians unless degrees are specified with the SETDEGREE function.

See Also:

ACOS

ACOSH

COSH

GCOS

SEC

SETDEGREE

SETRADIAN

TRIGONOMETRIC FUNCTIONS