rm(list = setdiff(ls(), lsf.str()))
# random variable definitgeion
d <- 3 # number of random variables
L <- 4 # quadrature level in each dimention.
# could be anisotropic eg c(3,4,5) for full quadrature
# PCE definition
QuadType <- "FULL" # type of quadrature
QuadPoly <- rep("LEGENDRE",d) # polynomial to use
ExpPoly <- rep("LEGENDRE",d) # polynomial to use
ParamDistrib <- NULL
# QuadType <- "SPARSE" # type of quadrature
# QuadPoly <- 'ClenshawCurtis' # polynomial to use
# ExpPoly <- rep("LEGENDRE",d) # polynomial to use
Quadrature = CreateQuadrature(d,L,QuadPoly,ExpPoly,QuadType,ParamDistrib) # quadrature
Run the code above in your browser using DataLab