FindRoots

버전 1.0.0.0 (7.33 KB) 작성자: Viktor Witkovsky
FindRoots estimates the real roots (zeros) of a real function FUN on the interval [A,B].
다운로드 수: 426
업데이트 날짜: 2016/2/2

라이선스 보기

FindRoots estimates the real roots (zeros) of a real (oscillatory) function FUN on the interval [A,B], by using adaptive nth-order (n=2^k) Chebyshev polynomial approximation of the function FUN.

This code was adapted from the code published in Day & Romero (2005): Roots Of Polynomials Expressed In Terms Of Orthogonal Polynomials. SIAM Journal on Numerical Analysis, 43, 1969-1987.

SYNTAX:
roots = FindRoots(fun,A,B)
roots = FindRoots(fun,A,B,n,isplot)

INPUTS:
fun - function handle, e.g. fun = @(x)sin(x).
A,B - lower and upper limit of the interval [A,B]. Default values are: A = -1, and B = 1.
n - polynomial order for approximation of the function fun, on each (automatically selected) sub-interval of [A,B]. n should be power of 2. Default value is n = 2^5. Increase the value of n if FindRoots is unable to find all roots of fun over the interval [A,B].
isplot - logical flag. If isplot = true, FindRoots plots the graph of the function together with depicted locations of its roots.

EXAMPLE 1:
fun = @(t) sin(t.^3 + t.^2 + t)
A = 0;
B = 5;
roots = FindRoots(fun,A,B)

EXAMPLE 2:
fun = @(t) exp(-.3*t) .* sin(10*t) .* cos(2*t.^2)
A = 5;
B = 15;
roots = FindRoots(fun,A,B)

EXAMPLE 3:
x = 3;
nu = 1;
cf_chi2 = @(t) (1 - 2i * t) .^(-nu/2);
fun = @(t) min(4,imag(exp(-1i*t*x).*cf_chi2(t))./t)
A = 0.2;
B = 10;
n = 2^7;
roots = FindRoots(fun,A,B,n)

EXAMPLE 4:
nu = 3;
fun = @(t) sin(0.5+5*t) .* (besselj(nu,t) - besselk(nu,t))
A = 150;
B = 200;
roots = FindRoots(fun,A,B)
Acknowledgements: Chebfun inspired this file. For more details see http://www.chebfun.org/.

인용 양식

Viktor Witkovsky (2026). FindRoots (https://kr.mathworks.com/matlabcentral/fileexchange/55206-findroots), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2015b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Polynomials에 대해 자세히 알아보기
도움

도움 받은 파일: Chebfun - current version

버전 게시됨 릴리스 정보
1.0.0.0

Added more detailed description of the input parameters.