Real roots on interval

版本 1.0.0.0 (2.8 KB) 作者: Stephen Morris
Find all real roots of an arbitrary function over an arbitrary interval
1.8K 次下载
更新时间 2007/5/29

查看许可证

This routine uses an analytical method to find all the real roots of an arbitrary function over an arbitrary interval. The approach used is to approximate the function by a series of Chebyshev polynomials, and then to find the roots of the approximation using a very efficient analytical method due to J.P. Boyd [see Appl. Num. Math. 56 pp.1077-1091 (2006)].

In the form given here, the function for which roots must be found is supplied as a MATLAB anonymous function. For example:

FindRealRoots(@(x) besselj(1,x),a,b,n)

...will find all the real roots of the function besselj(1,x) over the interval [a,b] based on an n-element Chebyshev expansion. At the end of the routine, as well as the calculated roots, the routine gives the time taken plus a plot of the original function and its approximation over the required interval: if the two do not coincide then the user should try again with a larger value of 'n'.

引用格式

Stephen Morris (2024). Real roots on interval (https://www.mathworks.com/matlabcentral/fileexchange/15122-real-roots-on-interval), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Polynomials 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0