Description Usage Arguments Value Author(s) References See Also Examples
Generates equidistributed nodes for computing the definite integral of a real-valued function defined on a hypercube [a,b] in R^d.
1 2 |
n |
total number of nodes |
a |
1.d left endpoints |
b |
1.d right endpoints |
type |
string, type of sequence. Choose from:
|
List with fields
xpoints
n.d quadrature nodes
weights
n.1 quadrature weights
Randall Romero-Aguilar, based on Miranda & Fackler's CompEcon toolbox
Miranda, Fackler 2002 Applied Computational Economics and Finance
Other quadrature functions: qnwlege
;
qnwlogn
; qnwnorm
;
qnwsimp
; qnwtrap
;
qnwunif
; quadrature
1 2 3 4 5 6 7 8 | # To compute definte integral of a real-valued function f defined on a hypercube
# [a,b] in R^d, write a function f that returns an m.1 vector when passed an
# m.d matrix, and write
q <- qnwequi(n,a,b,type);
Intf <- crossprod(q$w, f(q$x))
# Alternatively, use the quadrature function
Intf <- quadrature(f,qnwnequi,n,a,b,type)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.