Usage: |
{a,b,fa,fb} = nmbrackin(fname {,a0,b0,n})
|
Input: |
| fname | string, name of a function whose root should be
bracketed. The function should have just one scalar
parameter x. As a result, the function should return
a scalar.
|
| a0,b0 | optional scalars, distinct initial points
for bracketing, default: a0 = -10, b0 = 10
|
| n | optional scalar, a number of equally spaced subintervals of [a0,b0]
that will be searched for zero crossings; default n = 100
|
Output: |
| a,b | m x 1 vectors, bracketing pairs; a[i] contains the left
bracket and b[i] contains the right bracket of the i-th
bracketing pair (subinterval containing zero crossing) |
| fa,fb | m x 1 vectors, function values at a and b |