Function Prototype
/* Vector Arccosine */
/* Type: simple */
/* Input arrays: 1 Options: 0 Output arrays: 1 */
/* Inputs: real */
/* Options: none */
/* Outputs: acos */
int ti_acos_start(TI_REAL const *options);
int ti_acos(int size,
TI_REAL const *const *inputs,
TI_REAL const *options,
TI_REAL *const *outputs);
Description
This documentation is still a work in progress. It has omissions, and it probably has errors too. If you see any issues, or have any general feedback, please get in touch.
Vector Arccosine calculates the Trigonometric arccosine of each element in the input array.
$$acos_{t} = \arccos{input_{t}}$$
This is sometimes useful as a building block to more complex functions.
See Also
References
Example Usage
Calling From C
/* Example usage of Vector Arccosine */
/* Assuming that 'input' is a pre-loaded array of size 'in_size'. */
TI_REAL *inputs[] = {input};
TI_REAL options[] = {}; /* No options */
TI_REAL *outputs[1]; /* acos */
/* Determine how large the output size is for our options. */
const int out_size = in_size - ti_acos_start(options);
/* Allocate memory for output. */
outputs[0] = malloc(sizeof(TI_REAL) * out_size); assert(outputs[0] != 0); /* acos */
/* Run the actual calculation. */
const int ret = ti_acos(in_size, inputs, options, outputs);
assert(ret == TI_OKAY);
Calling From Lua (with Tulip Chart bindings)
-- Example usage of Vector Arccosine
acos = ti.acos(input)
Example Calculation
date | input | acos |
---|---|---|
2005-11-01 | 0.20 | 1.37 |
2005-11-02 | 0.30 | 1.27 |
2005-11-03 | 0.40 | 1.16 |
2005-11-04 | 0.30 | 1.27 |
2005-11-07 | 0.50 | 1.05 |
2005-11-08 | 0.70 | 0.80 |
2005-11-09 | 0.75 | 0.72 |
2005-11-10 | 0.90 | 0.45 |
2005-11-11 | 0.90 | 0.45 |
2005-11-14 | 1.00 | 0.00 |
2005-11-15 | 1.00 | 0.00 |
2005-11-16 | 0.20 | 1.37 |
2005-11-17 | 0.10 | 1.47 |
2005-11-18 | -0.10 | 1.67 |
2005-11-21 | -0.50 | 2.09 |
Chart
Other Indicators
Previous indicator: Vector Absolute Value
Next indicator: Accumulation/Distribution Line
Random indicator: Aroon Oscillator
Copyright © 2016-2024 Tulip Charts LLC. All Rights Reserved.