DigComT

Fibo

DirectoryDOS NameType
Numeric fibo m-function

Purpose

Fibonocci search for a minimum of a unimodal

Calling Sequence

x = Fibo(f, xlower, xupper, maxsearch) or [x, delta] = Fibo(f, xlower, xupper, maxsearch, farg, show)

INPUTS

Input Description
1 f
the unimodal function (a string)
2 xlower
the lower bound on the input to search
3 xupper
the lower bound on the input to search
4 maxsearch
the number of iterations

Optional INPUTS

Input Description Default Value
5 farg
a optional argument for the function f
[] (which means none)
6 show
plot the search
'no'

OUTPUTS

Output Description
1 x
the input that corresponds to the maximum value
2 delta
the granularity in the x estimate

Description

Fibonocci search for a minimum of a unimodal function on the interval
xlower < x < xupper The function is evaluated maxsearch times and the
error (in x) is less than (xupper-xlower)/Fibonocci(maxsearch)

Example

[x, delta] = Fibo('sin', min(t), max(t), 12, [], 'yes') % x = % -1.5716 % delta = % 0.0080
DigComT Manual Table of Contents DigComT Manual Native Intelligence Home

DigComT Licensee: Chris Heegard 
Native Intelligence
Last modified: Tuesday, January 11, 2000
Date created: Tuesday, January 11, 2000

Copyright © 1997-2000, Native Intelligence, All rights reserved.