Learn R Programming

GPC (version 0.1)

getM: Get canonical polynomial chaos expansion size

Description

The getM is a very simple function that determines the size of the canonical polynomial chaos expansion for d random variables up to and including degree p in the expansion. The size is determined from choose(d+p,d) or factorial(d+p)/factorial(d)/factorial(p).

Usage

getM(d,p)

Arguments

d
Number of input random variables
p
Order of the polynomial chaos expansion

Value

M
Number of terms in the canonical d-dimensional polynomial chaos expansion up to and including degree p

References

R. Ghanem and P. Spanos, 1991, Stochastic Finite Elements: A Spectral Approach. Berlin: Springer.

Examples

Run this code
d <- 10
p <- 15
m <- getM(d,p)

Run the code above in your browser using DataLab