Fibo
| Directory | DOS Name | Type |
| 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 |
|
f
|
the unimodal function (a string)
|
|
xlower
|
the lower bound on the input to search
|
|
xupper
|
the lower bound on the input to search
|
|
maxsearch
|
the number of iterations
|
Optional INPUTS
|
Input |
Description |
Default Value |
|
farg
|
a optional argument for the function f
|
[] (which means none)
|
|
show
|
plot the search
|
'no'
|
OUTPUTS
|
Output |
Description |
|
x
|
the input that corresponds to the maximum value
|
|
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 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.