rombergQuadrature

版本 1.1.0.0 (2.2 KB) 作者: Matthew Kelly
Computes integral of vector functions using Romberg quadrature.
68.0 次下载
更新时间 2016/3/1

查看许可证

% [x, err] = rombergQuadrature(fun,tSpan,tol)
%
% Compute the integral(fun), over the domain tSpan, to an accuracy of tol,
% using Romberg quadrature. Fully vectorized.
%
% Good for high-accuracy quadrature over smooth vector functions.
%
% If necessary, this function will automatically sub-divide the interval to
% achieve the desired accuracy. This should only occur when fun is stiff or
% non-smooth.
%
% INPUTS:
% fun = vector function to be integrated
% dx = fun(t)
% t = [1, nt] = time vector
% dx = [nx, nt] = function value at each point in t
% tSpan = [tLow, tUpp] = time span (domain) for integration
% tol = [nx,1] = desired error tolerance along each dimension
%
% OUTPUT:
% x = [nx,1] = integral along each dimension
% err = [nx, 1] = error estimate along each dimension
%
% NOTES:
% algorithm from:
% http://www.math.usm.edu/lambers/mat460/fall09/lecture29.pdf
%

引用格式

Matthew Kelly (2024). rombergQuadrature (https://www.mathworks.com/matlabcentral/fileexchange/55703-rombergquadrature), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012a
兼容任何版本
平台兼容性
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.1.0.0

Now the rombergQuadrature automatically detects a non-smooth integrand and sub-divides the interval to achieve the desired accuracy.

1.0.0.0