Romberg

バージョン 1.4 (3.34 KB) 作成者: Mazin Mustafa
Performs Romberg integration
ダウンロード: 1.1K
更新 2022/10/5

ライセンスの表示

Call Romberg.m to perform Romberg integration with specified tolerance and gives results
Call RombergDisp.m to display Romberg integration scheme coefficients
Icon image: An Introduction to Numerical Methods and Analysis, 2nd Edition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [I] = Romberg(func,a,b,tol,kmax)
Romberg integrates function "func" of one variable and nonsingular
from "a" to "b" with tolerance "tol" and maximum order of "kmax".
0 < tol < 1 & kmax > 0. Using Romberg integration.
I = Romberg(@func,a,b,tol,kmax)
I = Romberg(@func,a,b,tol)ss,ssdefault kmax = 15
I = Romberg(@func,a,b)ss,ssdefault tol = 1e-10ss,ssdefault kmax = 15
e.g.
I = Romberg(@sin,0,pi)
I = 2.000000000000000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [] = RombergDisp(func,a,b,k)
Romberg integrates function "func" of one variable and nonsingular
from "a" to "b" with order of "k" and displays all results.
k >= 0. Using Romberg integration.
I = RombergDisp(@func,a,b,k)
e.g.
RombergDisp(@sin,0,pi,2)
0.000000000000000ss
1.570796326794897ss2.094395102393195ss
1.896118897937040ss2.004559754984421ss1.998570731823836

引用

Mazin Mustafa (2024). Romberg (https://www.mathworks.com/matlabcentral/fileexchange/58286-romberg), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2016a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersNumerical Integration and Differential Equations についてさらに検索
謝辞

ヒントを与えたファイル: Romberg

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.4

Update

1.3

Update

1.2

correction

1.1.0.1

Revision

1.1.0.0

updates

1.0.0.0

description

description