LPBkg (version 1.2)

Legj: Evaluation of normalized shifted Legendre polynomials

Description

Evaluates the a basis of normalized shifted Legendre polynomials over a specified data vector.

Usage

Legj(u, m)

Arguments

u

Data vector on which the polynomials are to be evaluated.

m

The size of the basis to be considered.

Value

Numerical values of the first m normalized shifted Legendre polynomials.

Examples

Run this code
# NOT RUN {
x<-rnorm(1000,10,7)
xx<-x[x>=10 & x<=20]
G<-pnorm(20,5,15)-pnorm(10,5,15)
g<-function(x){dnorm(x,5,15)/G}
g<-Vectorize(g)
u<-g(xx)
Mmax=20
s<-as.matrix(Legj(u,Mmax))
# }

Run the code above in your browser using DataLab