# Compound Trapezoidal Method for Numerical Integration

by admin in Math, Statistics, and Optimization , MATLAB Family , Numerical Integration on April 30, 2019This code calculates the Numerical Integration of a given equation on a predefined interval using Compound Trapezoidal Method. This codes uses variable step size and gives good accuracy.

### Code Outputs:

- Chart of Integration History
- Chart of Residuals
- Printed values of Final Iteration value, Accuracy and Number of Iterations.

Result is: 0.86362, Accuracy: 9.8688e-05, NO Iterations: 25

### Input Requirements:

- The equation you intended to integrate
- Integration interval [a b].
- predefined error (default 0.0001).
- Maximum number of iterations (default 10000).

### About The Method:

Share Now!