Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: nummath
See also: nmbrackin

Quantlet: nmbrackout
Description: brackets a root of a given scalar function by expanding the range

Reference(s):

Usage: {a,b,fa,fb} = nmbrackout(fname {,a0,b0})
Input:
fname string, name of a function which 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 = 0, b0 = 1
Output:
a,b scalars bracketing a root of the function; a < b
fa,fb function values at points a and b

Example:
library("nummath")
proc(fval) = ftion(x)
  fval = x^2 - 16
endp
bracket = nmbrackout("ftion")
bracket

Result:
Contents of bracket.a
[1,]        0
Contents of bracket.b
[1,]     6.76
Contents of bracket.fa
[1,]      -16
Contents of bracket.fb
[1,]   29.698



Author: L. Cizkova, 20020515 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006