# line_ncc_rule

line_ncc_rule, a MATLAB code which computes a Closed Newton Cotes quadrature rule to approximate an integral over the length of a line segment in 1D.

### Languages:

line_ncc_rule is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

### Related Data and Programs:

ccn_rule, a MATLAB code which defines a nested Clenshaw Curtis quadrature rule.

chebyshev1_rule, a MATLAB code which computes and prints a Gauss-Chebyshev type 1 quadrature rule.

chebyshev2_rule, a MATLAB code which computes and prints a Gauss-Chebyshev type 2 quadrature rule.

clenshaw_curtis_rule, a MATLAB code which defines a Clenshaw Curtis quadrature rule.

legendre_rule, a MATLAB code which computes a 1D Gauss-Legendre quadrature rule.

line_felippa_rule, a MATLAB code which returns the points and weights of a Felippa quadrature rule over the interior of a line segment in 1D.

line_grid, a MATLAB code which computes a grid of points over the interior of a line segment in 1D.

line_integrals, a MATLAB code which returns the exact value of the integral of any monomial over the length of the unit line in 1D.

line_monte_carlo, a MATLAB code which applies a Monte Carlo method to estimate the integral of a function over the length of the unit line in 1D;

line_nco_rule, a MATLAB code which defines Newton-Cotes Open quadrature rules over the interior of a line segment in 1D.

patterson_rule, a MATLAB code which returns the points and weights of a 1D Gauss-Patterson quadrature rule of order 1, 3, 7, 15, 31, 63, 127, 255 or 511.

tetrahedron_ncc_rule, a MATLAB code which defines Newton-Cotes Closed quadrature rules over the interior of a tetrahedron in 3D.

triangle_fekete_rule, a MATLAB code which defines Fekete rules for quadrature or interpolation over the interior of a triangle in 2D.

triangle_felippa_rule, a MATLAB code which returns Felippa's quadratures rules for approximating integrals over the interior of a triangle in 2D.

triangle_ncc_rule, a MATLAB code which defines Newton-Cotes Closed quadrature rules over the interior of a triangle in 2D.

wedge_felippa_rule, a MATLAB code which returns quadratures rules for approximating integrals over the interior of the unit wedge in 3D.

### Reference:

1. Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.

### Source Code:

• line_ncc_rule.m, computes a Newton-Cotes closed rule for [A,B] of order N.

Last revised on 15 February 2019.