## Weddle's rule (composite)

version 1.1.1 (1.26 KB) by
Matlab codes for composite weddle's rule of numerical integration

Updated 27 Aug 2019

Let the values of a function f(x) be tabulated at points x_i equally spaced by h=x_(i+1)-x_i, so f_1=f(x_1), f_2=f(x_2), .... Then Weddle's rule approximating the integral of f(x) is given by the Newton-Cotes-like formula

int_(x_1)^(x_7)f(x)dx=3/(10)h(f_1+5f_2+f_3+6f_4+f_5+5f_6+f_7).

Example:
Enter lower limit a: 1
Enter upper limit b: 2
Enter the number of sub-intervals n: 36

The value of integration is 0.348307>>

### Cite As

Manotosh Mandal (2021). Weddle's rule (composite) (https://www.mathworks.com/matlabcentral/fileexchange/72527-weddle-s-rule-composite), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2019a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!