Vectorized Bisection Search (Scripts) Publisher's description
from Sky Sartorius
x = BISECTION(f,LB,UB,target,tol) finds array x +/- tol (LB < x < UB) such that f(x) = target array
x = BISECTION(f,LB,UB,target,tol) finds array x +/- tol (LB < x < UB) such that f(x) = target array.
This function is meant for use in finding roots of monotonic vectorized functions very quickly for situations where many function calls must be used. It is designed to be simple, not robust, but has useful applications where it will much more quickly find the roots of a function than FZERO, which is more robust and has more features.
x = bisection(@(x) x.^3, -10, 10, [(-100 : 10 : 100)' (-1000 : 100 : 1000)'], 1e-12)
System Requirements:MATLAB 7.5 (R2007b)
Program Release Status: New Release
Program Install Support: Install and Uninstall