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: nmparabint

Quantlet: nmbracket
Description: This quantlet brackets a minimum of a given scalar function

Reference(s):

Usage: {a,b,c,fa,fb,fc} = nmbracket(func {,a0,b0})
Input:
func name of function (string) whose minimum should be bracketed. The function should have just one scalar parameter x. As a result, the function should return a scalar.
a0,b0 distinct initial points (scalars) for bracketing, default: a0 = 0, b0 = 1
Output:
a,b,c points (scalars) bracketing a minimum of func; a < b < c
fa,fb,fc function values at points a,b,c respectively; bracketing of minimum means that fb < fa and fb < fc

Example:
library("nummath")
;
; definition of function
;
proc(p)=f(x)
  p = cos((x+3*pi)/4)*x^2
endp
bracket=nmbracket("f")
bracket

Result:
Contents of bracket.a
[1,]    2.618
Contents of bracket.b
[1,]   5.2361
Contents of bracket.c
[1,]   9.4721
Contents of bracket.fa
[1,]  -6.7955
Contents of bracket.fb
[1,]  -23.743
Contents of bracket.fc
[1,]   1.0622



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