提問者採納: a=0; b=5; c=(a+b)/2; while abs(f(c))>=0.00001 %加個絕對值 if f(a)*f(c)>=0 a=c; else b=c; end c=(a+b)/2; ...
zhidao.baidu.com