change_grid {bliss}R Documentation

change_grid

Description

Compute a function (evaluated on a grid) on a given (finer) grid.

Usage

change_grid(fct, grid, new_grid)

Arguments

fct

a numerical vector, the function to evaluate on the new grid.

grid

a numerical vector, the initial grid.

new_grid

a numerical vector, the new grid.

Value

a numerical vector, the approximation of the function on the new grid.

Examples

grid <- seq(0,1,l=1e1)
new_grid <- seq(0,1,l=1e2)
fct <- 3*grid^2 + sin(grid*2*pi)
plot(grid,fct,type="o",lwd=2,cex=1.5)
lines(new_grid,change_grid(fct,grid,new_grid),type="o",col="red",cex=0.8)

[Package bliss version 1.0.2 Index]