Function Prototype
/* Vector Hyperbolic Cosine */
/* Type: simple */
/* Input arrays: 1 Options: 0 Output arrays: 1 */
/* Inputs: real */
/* Options: none */
/* Outputs: cosh */
int ti_cosh_start(TI_REAL const *options);
int ti_cosh(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 Hyperbolic Cosine calculates the Trigonometric hyperbolic cosine of each element in the input array.
$$cosh_{t} = \cosh{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 Hyperbolic Cosine */
/* 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]; /* cosh */
/* Determine how large the output size is for our options. */
const int out_size = in_size - ti_cosh_start(options);
/* Allocate memory for output. */
outputs[0] = malloc(sizeof(TI_REAL) * out_size); assert(outputs[0] != 0); /* cosh */
/* Run the actual calculation. */
const int ret = ti_cosh(in_size, inputs, options, outputs);
assert(ret == TI_OKAY);
Calling From Lua (with Tulip Chart bindings)
-- Example usage of Vector Hyperbolic Cosine
cosh = ti.cosh(input)
Example Calculation
date | input | cosh |
---|---|---|
2005-11-01 | 0.20 | 1.02 |
2005-11-02 | 0.30 | 1.05 |
2005-11-03 | 0.40 | 1.08 |
2005-11-04 | 0.30 | 1.05 |
2005-11-07 | 0.50 | 1.13 |
2005-11-08 | 0.70 | 1.26 |
2005-11-09 | 0.75 | 1.30 |
2005-11-10 | 0.90 | 1.43 |
2005-11-11 | 0.90 | 1.43 |
2005-11-14 | 1.00 | 1.54 |
2005-11-15 | 1.00 | 1.54 |
2005-11-16 | 0.20 | 1.02 |
2005-11-17 | 0.10 | 1.01 |
2005-11-18 | -0.10 | 1.01 |
2005-11-21 | -0.50 | 1.13 |
Chart
Other Indicators
Previous indicator: Vector Cosine
Next indicator: Crossany
Random indicator: Directional Indicator
Copyright © 2016-2024 Tulip Charts LLC. All Rights Reserved.