【发布时间】:2014-02-18 17:50:56
【问题描述】:
问题如下:
在 Octave 中实施 regula falsi 方法的伊利诺伊版本。 函数的签名是
illinois(
f, % a real numeric function
a, % left bound of search interval
b, % right bound of search interval
yAcc, % accuracy in the y-dimsension
nIter % maximum number of iterations
)
提示:http://en.wikipedia.org/wiki/False_position_method#Illinois_algorithm
我想问:
我如何在 Matlab 函数中为这个问题输入一个实数函数?
例如说我在 x^2-4 中搜索 1 和 3 之间的根,所以它在 GUI 上的功能应该是
illinois(x^2-4, 1, 3, 0.1, 1000)
我如何告诉 matlab/octave 这个“数字函数”x^2-4 或者我错误地解释了这个问题?
【问题讨论】: