Page 191 - Compact Numerical Methods For Computers
P. 191
180 Compact numerical methods for computers
Algorithm 20. Axial search (cont.)
temp := 0.5*(fplus-f)/step; {first order parabola coefficient}
fplus := 0.5*(fplus+f-2.0*fmin)/(step*step);
{2nd order parabolic coefficient - 0th order is fmin}
if fplus<>0.0 then {avoid zero divide}
begin
cradius := 1.0+temp*temp;
cradius := cradius*sqrt(cradius)/fplus; {radius of curvature}
end
else
cradius := big; {a safety measure}
tilt := 45.0*arctan(temp)/arctan(1.0); {rem tilt in degrees}
write(cradius: 12,’’‚tilt: 12);
end
writeln; {to advance printer to next line}
end; {loop on i -- STEP 9}
end; {alg20.pas == axissrch -- STEP 10}
Example 14.1. Using the Nelder-Mead simplex procedure (algorithm 19)
Consider a (time) series of numbers
Q t t = 1, 2 , . . . , m.
A transformation of this series to
P =Q -b Q t- 1 -b Q t- 2 t = 1, 2, . . . , m
1
2
t
t
will have properties different from those of the original series. In particular, the
autocorrelation coefficient of order k is defined (Kendall 1973) as
The following output was produced with driver program DR1920, but has been
edited for brevity. The final parameters are slightly different from those given in the
first edition, where algorithm 19 was run in much lower precision. Use of the final
parameters from the first edition (1·1104, -0·387185) as starting parameters for the
present code gives an apparent minimum.
Minimum function value found = 2.5734305415E-24
At parameters
B[l]= 1.1060491080Et00
B[2]= -3.7996531780E-01
dr1920.pas -- driver for Nelder-Mead minimisation
1989/01/25 15: 21: 37
File for input of control data ([cr] for keyboard) ex14-1
File for console image ([cr] = nul) d:testl4-1.
Function: Jaffrelot Minimisation of First Order ACF
25.02000 25.13000 25.16000 23.70000 22.09000 23.39000 26.96000