Learn R Programming

chebpol (version 1.3-952)

chebknots: Create a Chebyshev-grid

Description

Create a Chebyshev grid on a hypercube.

Usage

chebknots(dims, intervals=NULL)

Arguments

dims
The number of grid-points in each dimension. For Chebyshev-polynomial of degree dims-1.
intervals
A list of vectors of length 2. The lower and upper bounds of the hypercube.

Value

  • A array of dimension dims. The Chebyshev grid-points.

concept

Chebyshev polynomial

Details

If intervals is not provided, it is assumed that the domain of the function in each dimension is [-1,1]. Thus, standard Chebyshev knots are produced. If dims is of length 1, intervals may be a vector of length 2 rather than a list with a vector of length 2.

Examples

Run this code
## Standard knots for degree 3
chebknots(4)
## Knots in the interval [2,3] for degree 3
chebknots(4,interval=c(2,3))
## Multivariate knots
chebknots(c(x=3,y=4,z=3))
## Multivariate grid
expand.grid(chebknots(c(x=3,y=4,z=5), list(c(1,3), c(4,6), c(800,900))))

Run the code above in your browser using DataLab