Learn R Programming

nimbleSCR (version 0.2.1)

getMidPointNodes: Generate midpoint integration nodes

Description

Generate midpoint nodes and weights for integrating a function numerically over a set of windows. For each window, generate a set of equally spaced nodes and weights.

Usage

getMidPointNodes(lowerCoords, upperCoords, numSubintervals = 10)

Value

A list of midpoint nodes and weights.

Arguments

lowerCoords, upperCoords

Matrices of lower and upper x- and y-coordinates of a set of windows. One row for each window.

numSubintervals

Number of subintervals each dimension of a window is divided into.

Author

Wei Zhang

Examples

Run this code
lowerCoords <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1), nrow = 4, byrow = TRUE)
upperCoords <- matrix(c(1, 1, 2, 1, 1, 2, 2, 2), nrow = 4, byrow = TRUE)
getMidPointNodes(lowerCoords, upperCoords, 5)

Run the code above in your browser using DataLab