PolynomF (version 2.0-2)

poly_orth: Simpl orthogonal polynomials

Description

Generate a list of polynomials up to a specified degree, orthogonal with respect to the natural inner product on a discrete, finite set of x-values with equal weights.

Usage

poly_orth(x, degree = length(unique(x)) - 1, norm = TRUE)

poly.orth(...)

Arguments

x

A numeric vector

degree

The desired maximum degree

norm

Logical: should polynomials be normalised to length one?

...

Arguments passed on to the non-deprecated function.

Value

A list of orthogonal polynomials as a polylist object

Examples

Run this code
# NOT RUN {
x <- c(0:3, 5)
P <- poly_orth(x)
plot(P, lty = "solid")
Pf <- as.function(P)
zap(crossprod(Pf(x)))
# }

Run the code above in your browser using DataCamp Workspace