Simpson's rule for numerical integration

버전 1.5.0.0 (2.48 KB) 작성자: Damien Garcia
The Simpson's rule uses parabolic arcs instead of the straight lines used in the trapezoidal rule
다운로드 수: 10.3K
업데이트 날짜: 2013/5/22

라이선스 보기

Z = SIMPS(Y) computes an approximation of the integral of Y via the Simpson's method (with unit spacing). To compute the integral for spacing different from one, multiply Z by the spacing increment.

Z = SIMPS(X,Y) computes the integral of Y with respect to X using the Simpson's rule.

Z = SIMPS(X,Y,DIM) or SIMPS(Y,DIM) integrates across dimension DIM

SIMPS uses the same syntax as TRAPZ.

Example:
-------
% The integral of sin(x) on [0,pi] is 2
% Let us compare TRAPZ and SIMPS
x = linspace(0,pi,6);
y = sin(x);
trapz(x,y) % returns 1.9338
simps(x,y) % returns 2.0071

인용 양식

Damien Garcia (2024). Simpson's rule for numerical integration (https://www.mathworks.com/matlabcentral/fileexchange/25754-simpson-s-rule-for-numerical-integration), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.5.0.0

Modification in the description

1.4.0.0

Modifications in the help text

1.2.0.0

Minor modifications in the descriptions and help texts of the two functions.