Description Usage Arguments Value Examples
function for vector recursive sequence calculation Recurpackage recur_vec package The input should have one vector and a sequence number indicator n , The vector should have more than one elements while the sequence number indicator n should be a positive integar (>n) The output is the final nth element of the sequence to calculate defined as following X_n = X_(n-1) + |X_(n-2) -X(n-3)|/2
1 | recur_vec(x, n)
|
x |
x should be a vector with more than one elements. However, the function will only take the first three elements of the vector as the initial value as the recursive sequence initial value input |
n |
n should be a positive integer number |
The output is the final nth element of the sequence to calculate defined as following X_n = X_(n-1) + |X_(n-2) -X(n-3)|/2
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.