COS
Syntax
COS(data [, units_keyword])
Parameters
data
The numerical values to compute the cosine 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 IBM® Unica® 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 IBM® Unica® Campaign, see Format Specifications.
For more details on using keywords in IBM® Unica® PredictiveInsight, see Format Specifications.
Description
COS calculates the cosine of the values in the specified data range. It returns one new column for each input column, each containing the cosine of numbers in the corresponding input column.
Examples
TEMP = COS(PI) or TEMP = COS(PI, 0) or TEMP = COS(PI, RADIAN)
Returns a new column named TEMP containing a single value of -1.
TEMP = COS(90, 1) or TEMP = COS(90, DEGREE)
Returns a new column named TEMP containing a single value of zero.
TEMP = COS(V1) or TEMP = COS(V1, 0) or TEMP = COS(V1, RADIAN)
Creates a new column named TEMP, where each value is the cosine (in radians) of the contents of column V1.
Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the cosines of the contents of column V1, the values of the VX column are the cosines of the contents of column V2, and the values of the VY column are the cosines of the contents of column V3. All values are in degrees.
Creates a new column named TEMP, where the first 11 cells contain the cosines of the values in rows 10-20 of column V1 (in radians). The other cells in TEMP are empty.
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 cosines of the corresponding rows of column V1, and the values in column VX are the cosines of the corresponding rows of column V2. All values are in radians.
Related Functions