COT macro

The COT macro is available only in HCL® Campaign.

Syntax

COT(data [, units_keyword])

Parameters

data

The numerical values to compute the cotangent of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your HCL product.

units_keyword

This optional keyword determines whether the input values and results are interpreted as degrees or radians. Select one of the following:

RADIAN - Performs the calculations in radians (default)

DEGREE - Performs the calculations in degrees

If this parameter is not specified, the default is radians. (To convert from radians to degrees, divide by PI and multiply by 180.)

For more details on using keywords in HCL Campaign, see Format Specifications.

Description

COT calculates the cotangent of values in the specified data range. The cotangent is the reciprocal of the tangent. COT returns one new column for each input column, each containing the cotangent of numbers in the corresponding input column.

Note: If a cell contains a value whose tangent is zero, then the arccotangent is infinity. In this case, COT returns the largest 32-bit floating-point number.

Examples

TEMP = COT(90) or TEMP = COT(90, 0) or TEMP = COT(90, RADIAN)

Returns a new column named TEMP containing the value -0.5.

TEMP = COT(0)

Returns a new column named TEMP containing the value MAX_FLOAT_32.

TEMP = COT(V1, 1) or TEMP = COT(V1, DEGREE)

Creates a new column named TEMP, where each value is the cotangent of the contents (in degrees) of the column V1.

TEMP = COT(V1:V3, 1)

Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the cotangents of the contents of column V1, the values of the VX column are the cotangents of the contents of column V2, and the values of the VY column are the cotangents of the contents of column V3. All values are in degrees.

TEMP = COT(V1[10:20])

Creates a new column named TEMP, where the first 11 cells contain the cotangents of the values in rows 10-20 of column V1 (in radians). The other cells in TEMP are empty.

TEMP = COT(V1[1:5]:V2)

Creates two new columns named TEMP and VX, each with values in rows 1-5 (the other cells are empty). The values in column TEMP are the cotangents of the corresponding rows of column V1, and the values in column VX are the cotangents of the corresponding rows of column V2. All values are in radians.

Related functions

Function Description
ACOT Computes the arccotangent of the contents of the specified data range
COS Computes the cosine of the contents of the specified data range
SIN Computes the sine of the contents of the specified data range
TAN Computes the tangent of the contents of the specified data range