MATLAB 二分法、牛顿迭代法、弦截法二分法Newton法:弦截法
二分法binarySearch.m文件:function binarySearch(f,bot,top)err = 1e-6;while abs(top-bot)>err x=(bot+top)/2; fx=f(x); if fx==0 bot=x; top=x; elseif f(bot)*fx<0 top=x; else bot=x; end fprintf('·½³ÌµÄ¸ùx.