xinterp {rjacobi}R Documentation

Quadrature interpolation

Description

Returns and modifies a interpolation points of a quadrature

Usage

x <- xinterp(q)
xinterp(q) <- value

Arguments

q An object of class quadrature returned by the quadrature function
value Points where the interpolation should be calculated

Details

This function is used to set or modify the points where interpolation occurs. It modifies the fields xinterp and imat of the an object with class quadrature.

Value

Interpolation points

References

Abramowitz, Milton and Stegun, Irene (editors); "Handbook of Mathematical functions", Dover Publications 1965.

Karniadakis, George Em and Sherwin, Spencer; "Spectral/hp Element Methods for Computational Fluid Dynamics", Oxford Science Publications, 2nd edition, 2005.

See Also

lagrangeGJ quadrature quadInterp interpmatGJ

Examples


## Interpolates the Runge function in the interval (-1,1)

runge <- function(x){1 / (1 + 25*x^2)}

q <- quadrature(13, type='GLJ')

z <- q$x

x <- seq(-1, 1, by=0.02)
xinterp(q) <- x

x2 <- seq(-1, 1, len=201)

fe <- runge(x2)

f <- runge(z)

finterp <- quadInterp(q, runge)

plot(x2, fe, ty='l', xlab='x', ylab='y',
main='Runge function interpolation')

points(z, f)
lines(x, finterp, lty=2)



[Package rjacobi version 0.9.2 Index]