This example illustrates how to apply the inverse trigonometric (Arc) functions to your transformations.
Info |
---|
NOTE: These functions are valid over specific ranges. |
- Arcsine. See ASIN Function.
- Arccosine. See ACOS Function
- Arctangent. See ATAN Function.
- Arccotangent. Computed using ATAN function. See below.
- Arcsecant. Computed using ACOS function. See below.
- Arccosecant. Computed using ASIN function. See below.
Source:
In the following sample, input values are in radians. In this example, all values are rounded to two decimals for clarity.
Y |
---|
-1.00 |
-0.75 |
-0.50 |
0.00 |
0.50 |
0.75 |
1.00 |
Transformation:
Arcsine:
Valid over the range (-1 <= Y <= 1)
D trans |
---|
RawWrangle | true |
---|
p03Value | 'asinY' |
---|
Type | step |
---|
WrangleText | derive type: single value: round(degrees(asin(Y)), 2) as: 'asinY' |
---|
p01Name | Formula type |
---|
p01Value | Single row formula |
---|
p02Name | Formula |
---|
p02Value | round(degrees(asin(Y)), 2) |
---|
p03Name | New column name |
---|
SearchTerm | New formula |
---|
|
Arccosine:
Valid over the range (-1 <= Y <= 1)
D trans |
---|
RawWrangle | true |
---|
p03Value | 'acosY' |
---|
Type | step |
---|
WrangleText | derive type: single value: round(degrees(acos(Y)), 2) as: 'acosY' |
---|
p01Name | Formula type |
---|
p01Value | Single row formula |
---|
p02Name | Formula |
---|
p02Value | round(degrees(acos(Y)), 2) |
---|
p03Name | New column name |
---|
SearchTerm | New formula |
---|
|
Arctangent:
Valid over the range (-1 <= Y <= 1)
D trans |
---|
RawWrangle | true |
---|
p03Value | 'atanY' |
---|
Type | step |
---|
WrangleText | derive type: single value: round(degrees(atan(Y)), 2) as: 'atanY' |
---|
p01Name | Formula type |
---|
p01Value | Single row formula |
---|
p02Name | Formula |
---|
p02Value | round(degrees(atan(Y)), 2) |
---|
p03Name | New column name |
---|
SearchTerm | New formula |
---|
|
Arccosecant:
This function is valid over a set of ranged inputs, so you can use a conditional column for the computation. For more information, see ASIN Function.
D trans |
---|
RawWrangle | true |
---|
p03Value | round(degrees(asin(divide(1, Y))), 2) |
---|
Type | step |
---|
WrangleText | case condition: ifThenElse if: (Y <= -1) || (Y >= 1) then: round(degrees(asin(divide(1, Y))), 2) as: 'acscY' |
---|
p01Name | Condition type |
---|
p01Value | if...then...else |
---|
p02Name | If |
---|
p02Value | (Y <= -1) || (Y >= 1) |
---|
p03Name | Then |
---|
p04Value | 'acscY' |
---|
p04Name | New column name |
---|
SearchTerm | Conditional column |
---|
|
Arcsecant:
Same set of ranged inputs apply to this function. For more information, see ACOS Function.
D trans |
---|
RawWrangle | true |
---|
p03Value | round(degrees(acos(divide(1, Y))), 2) |
---|
Type | step |
---|
WrangleText | case condition: ifThenElse if: (Y <= -1) || (Y >= 1) then: round(degrees(acos(divide(1, Y))), 2) as: 'asecY' |
---|
p01Name | Condition type |
---|
p01Value | if...then...else |
---|
p02Name | If |
---|
p02Value | (Y <= -1) || (Y >= 1) |
---|
p03Name | Then |
---|
p04Value | 'asecY' |
---|
p04Name | New column name |
---|
SearchTerm | Conditional column |
---|
|
Arccotangent:
For this function, the two different ranges of inputs have different computations, so an else
condition is added to the transformation. For more information, see ATAN Function.
D trans |
---|
RawWrangle | true |
---|
p03Value | round(degrees(atan(divide(1, Y))), 2) |
---|
WrangleText | case condition: ifThenElse if: Y > 0 then: round(degrees(atan(divide(1, Y))), 2) else: round(degrees(atan(divide(1, Y)) + pi()), 2) as: 'acotY' |
---|
p01Name | Condition type |
---|
p03Name | Then |
---|
p04Value | round(degrees(atan(divide(1, Y)) + pi()), 2) |
---|
SearchTerm | Conditional column |
---|
Type | step |
---|
p05Name | New column name |
---|
p01Value | if...then...else |
---|
p02Name | If |
---|
p02Value | Y > 0 |
---|
p05Value | 'acotY' |
---|
p04Name | Else |
---|
|
Results:
Y | acotY | asecY | acscY | atanY | acosY | asinY |
---|
-1.00 | -41.86 | 180.00 | -90.00 | -45.00 | 180.00 | -90.00 |
-0.75 | -49.99 | null | null | -37.00 | 139.00 | -49.00 |
-0.50 | -60.29 | null | null | -27.00 | 120.00 | -30.00 |
0.00 | null | null | null | 0.00 | 90.00 | 0.00 |
0.50 | 63.44 | null | null | 27.00 | 60.00 | 30.00 |
0.75 | 53.13 | null | null | 37.00 | 41.00 | 49.00 |
1.00 | 45.00 | 0.00 | 90.00 | 45.00 | 0.00 | 90.00 |