细节的方法以及编码看讲座:https://youtu.be/GrrlTRuC4k0
例子:
输入函数f (x):内联(x * * * 4 * x - 9)
进入左点间隔2
输入正确的时间间隔3
0.001输入错误
x0 x1 (x0) f (x1)
2.0000 3.0000 -9.0000 6.0000
3.0000 2.6000 6.0000 -1.8240
2.6000 2.6933 -1.8240 -0.2372
2.6933 2.7072 -0.2372 0.0120
2.7072 2.7065 0.0120 -0.0001
根是2.707 > >
引用作为
博士Manotosh Mandal (2023)。割线法(//www.tatmou.com/matlabcentral/fileexchange/72481-secant-method), MATLAB中央文件交换。检索。