二分法查找 matlab,matlab向量的二分法搜索

Vectorized Bisection Search

x = BISECTION(f,LB,UB,target,tol) uses a few simple lines for a fast bisection search to find array x +/- tol (LB < x < UB) such that f(x) = target.

This function is meant for use in finding roots of functions very quickly for situations where many function calls must otherwise be used and time is very important. This function is designed to be simple and quick, but it has useful applications where it will more quickly find the roots of a function than FZERO, which has more features but must be used in a loop for solving multiple cases.

Any or all of f(scalar), f(n-dim array), LB, UB, target, and tol may be scalars and/or n-dim arrays (where all of size(n-dim array) is the same). The output x will be this size. f will not be evaluated outside of interval specified by LB and UB. f should have only one root. For best results, f should be monotonic.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值