[38ba34]: / Application / Examples / BikeSpring / Model / optimize.m

Download this file

18 lines (14 with data), 411 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
function [x] = optimize(xmin,x,xmax,maxiter)
% Finds the minimum of a function of N variables using Bremermann's method
%
% Input:
% x...........Initial guess (vector of N elements)
% maxiter.....Stops when no improvent occurs for this many iterations
% Output:
% x...........Estimate of the minimum
% start iteration loop
i = 0;
while i<maxiter
d = randn(size(x));
golden(x,d);
end