⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 secant.m

📁 计算方法 大学 求根 牛顿求根公式D:matlab mm ootfind.rar
💻 M
字号:
function x = secant(fun,a,b,xtol,ftol,verbose)
% secant  Secant method for finding roots of scalar f(x) = 0
%
% Synopsis:  x = secant(fun,a,b)
%            x = secant(fun,a,b,xtol)
%            x = secant(fun,a,b,xtol,ftol)
%            x = secant(fun,a,b,xtol,ftol,verbose)
%
%  Input:  fun  = (string) name of function for which roots are sought
%          a,b  = endpoints of initial bracket interval
%          xtol = (optional) relative tolerance on x.     Default:  xtol=5*eps
%          ftol = (optional) relative tolerance on f(x).  Default:  ftol=5*eps
%          verbose = (optional) printing switch.  Default: verbose=0, no printing.
%
%  Output:  x = the root of the function

error('Completion of code in secant function is an exercise for the reader');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -