coordinateSearch

Coordinate-based search for multivariate object functioni

Contents

Syntax

Description

opt=coordinateSearch(objFunction, initialGuess, opPrm) returns the best option (or parameters) for a given objective function.

Example

guess.x=-1;
guess.y=1;
opPrm.x.range=[-4, 4];
opPrm.x.resolution=101;
opPrm.y.range=[-4, 4];
opPrm.y.resolution=101;
[opt, maxPerf, optHistory]=coordinateSearch('peaksFcn', guess, opPrm);
[xx, yy, zz]=peaks(opPrm.x.resolution);
pcolor(xx, yy, zz); axis image
for i=1:length(optHistory)
	line(optHistory(i).x, optHistory(i).y, 'marker', 'o', 'color', 'w');
	text(optHistory(i).x, optHistory(i).y, int2str(i));
end
Iteration=1/10
	opt.x=-0.080000
	opt.y=1.600000
	perf=8.059150
Iteration=2/10
	opt.x=0.000000
	opt.y=1.600000
	perf=8.099988
Iteration=3/10
	opt.x=0.000000
	opt.y=1.600000
	perf=8.099988

See Also

binarySearch4min.


Top page   Next: combine.m   Prev:cumHistCount.m