Implementation of Midpoint, Trapezoidal, and Simpson Rule

(a) Midpoint rule (b) Trapezoidal rule (c) Simpson’s rule
1,4K Downloads
Aktualisiert 26. Sep 2012

Lizenz anzeigen

Implementation of the following methods to compute the integral numerically--
(a) Midpoint rule
(b) Trapezoidal rule
(c) Simpson’s rule
for NI intervals. Since Simpson’s rule requires an even number of intervals, assume NI even.

Note that the number of points is N = NI for open rules and N = NI + 1 for closed rules.

Generation of a single plot showing the absolute error versus NI for the different methods with a = 5,
b = 10, and c = 4.

Zitieren als

Mohammad Hossain (2024). Implementation of Midpoint, Trapezoidal, and Simpson Rule (https://www.mathworks.com/matlabcentral/fileexchange/38352-implementation-of-midpoint-trapezoidal-and-simpson-rule), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2010a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0