Skip to contents

generate curve based on legendre polynomials

Usage

legendre_fit(par, x)

Arguments

par

vector of legendre polynomials coefficients

x

vector equal to the x value for legendre polynomials(in this case times)

Value

the polynomials value

Examples

legendre_fit(rep(1,5),1:14)
#>  [1] 1.0000000 0.4152866 0.3182312 0.4693463 0.6879661 0.8522461 0.8991632
#>  [8] 0.8245159 0.6829243 0.5878296 0.7114947 1.2850040 2.5982634 5.0000000