How can I set meshsize respectively for each parameter on patternsearch?
Show older comments
I am trying to optimize 4 parameters of the Page test using patternsearch. However, the estimated orders of the 4 parameters are different. See the initial parameters "param0" in the code below. In particular, I would like to set the meshsize to 10 for the first parameter, 10 for the second parameter, 0.1 for the third parameter, and 0.001 for the fourth parameter. My question is that is it possible to set the different meshsize for each parameter? Thank you so much in advance.
rand1 = rand(1)*1000; rand2 = rand(1)*1000; rand3 = rand(1); rand4 = rand(1)/100;
param0 = [round(max(rand1,rand2)), round(min(rand1,rand2)), round(rand3, 2), round(rand4, 5)];
options = optimoptions('patternsearch', 'PlotFcn', 'psplotbestx', 'MeshTolerance', 1, 'ScaleMesh', false, 'InitialMeshSize',10);
A = [];
b = [];
Aeq = [];
beq = [];
nlcon = [];
lb = [1 1 0.1 1/500000];
ub = [100000 100000 10 1/25000];
fun = @do;
[param, RSS, exitflag, ~] = patternsearch(fun, param0, A, b, Aeq, beq, lb, ub, nlcon, options);
Accepted Answer
More Answers (0)
Categories
Find more on Direct Search in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!