Weights and abscissae of Newton-Cotes quadrature
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
numeric::ncdata(n) returns the weights and
the abscissae of the Newton-Cotes quadrature rule with n equidistant
The Newton-Cotes quadrature rule produces the exact integral for all polynomials f through degree n - 1. If n is odd, then the quadrature rule is exact through degree n.
The equidistant abscissae c = [c1, …, cn] are given by .
numeric::ncdata is not sensitive to the environment
The function uses
The following call produces exact data for the quadrature rule with four nodes:
The number of nodes: a positive integer
[b,c] is returned. The lists
= [b1, …, bn] and
= [c1, …, cn] are
the rational weights and abscissae of the Newton-Cotes quadrature
The numerical integrator
provide the data for Newton-Cotes quadrature.