Trapezoidal rule

Trapezoidal rule
0 Downloads
Updated 11 Apr 2025

View License

Example : Find approximate value of the function 1/(1+x^2) when integrating fron 0 t0 1, with increment h-0.2
[0 1] = [0 0.2 0.4 0.6 0.8 1] for h = 0.2
Note that no of term is 6, no of interval is 5.
enter the function : 1/(1+x^2)
enter lower limit : 0
enter upper limit : 1
enter no of term : 6
ans =
0.7842407666

Cite As

Langel Thangmawia (2025). Trapezoidal rule (https://uk.mathworks.com/matlabcentral/fileexchange/180762-trapezoidal-rule), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0