Poly | R Documentation |
Polynomial functions as per the Gnu Scientific Library, reference manual
section 6.1. These functions are defined in header
file gsl_poly.h
gsl_poly(c_gsl,x)
c_gsl |
Coefficients of the poynomial ( |
x |
input: real values |
One must be careful to avoid off-by-one errors. In C idiom, the function evaluates the polynomial
c[0]+c[1]+...+c[len-1]x^(len-1)
where len is the second argument of GSL function
gsl_poly_eval()
.
The R idiom would be
c[1]+c[2]+...+c[len]x^(len-1).
This section is work-in-progress and more will be added when I have the time/need for the other functions here.
Robin K. S. Hankin
https://www.gnu.org/software/gsl/
a <- matrix(1:4,2,2) rownames(a) <- letters[1:2] (jj <- gsl_poly(1:3,a)) jj-(1 + 2*a + 3*a^2) #should be small
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.