Numerical Integration using Simpson's Rules

Performs the numerical integration using Simpson's rules of any function.
78 téléchargements
Mise à jour 3 déc. 2019

Afficher la licence

Numerical Integration using Simpson's Rules

Implementation based on the theory contained in "Numerical Methods for Engineers" by Steven C. Chapra.

Instructions to use the function

The user must provide the function as an anonymous function in the command window. This can be done by introducing

f=@(x) x.*exp(2*x)

Then, the user should invoke the function by indicating four parameters:

Simp(f,lmin,lmax,N)

where f is the integrand and N is the number of intervals. lmin and lmax are the lower and upper limits of the definitive integral.

The function automatically chooses the method to follow depending on the value of N.

- If N is an even number, it selects Simpson's rule 1/3
- If N is divisible by 3, it selects Simpson's rule 3/8
- In N is an odd number and not divisible by 3, it combines the methods.

Citation pour cette source

Manuel Ferrer (2026). Numerical Integration using Simpson's Rules (https://fr.mathworks.com/matlabcentral/fileexchange/73538-numerical-integration-using-simpson-s-rules), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2019b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Numerical Integration and Differential Equations dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.0.0