Bisection Method (bisection_method)
bisection_method
Bisection method for finding the root of a univariate, scalar-valued function.
Syntax
x = bisection_method(f,a,b)
x = bisection_method(f,a,b,opts)
[x,k] = bisection_method(__)
[x,k,x_all] = bisection_method(__)
Description
x = bisection_method(f,a,b)
returns the root of a function specified by the function handle
f
, where a
and b
define the initial guess for the interval containing the root.
x = bisection_method(f,a,b,opts)
does the same as the syntax above, but allows for the specification of optional solver parameters. opts
is a structure with the following fields:
-
k_max
→ maximum number of iterations (defaults to 200) -
return_all
→ returns estimates at all iteration if set totrue
(defaults tofalse
) -
TOL
→ tolerance (defaults to)
[x,k] = bisection_method(__)
also returns the number of iterations (k
) performed of the bisection method.
[x,k,x_all] = bisection_method(__)
does the same as the previous syntaxes, but also returns an array (x_all
) storing the root estimates at each iteration. This syntax requires that opts.return_all
be set to true.
Examples and Additional Documentation
- See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.
- See "Root_Finding_Methods.pdf" (also included with download) for the technical documentation.
인용 양식
Tamas Kis (2023). Bisection Method (bisection_method) (https://github.com/tamaskis/bisection_method-MATLAB/releases/tag/v6.3.0), GitHub. 검색됨 .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!