optimset without effect --- option MaxFunEvals seems to remain unchanged after the options=optimset - command

1 次查看(过去 30 天)
Writing the commands
options = optimset('MaxFunEvals',100000,'MaxIter',10000);
optimset('fminsearch')
I receive the answer: Display: 'notify' MaxFunEvals: '200*numberofvariables'
MaxIter: '200*numberofvariables'
TolFun: 1.000000000000000e-04
TolX: 1.000000000000000e-04
FunValCheck: 'off'
and it seems nothing has changed after my optimset command. What did I wrong?

回答(2 个)

Steven Lord
Steven Lord 2016-6-9
The optimset function does NOT make some sort of "global" change, as I believe you expected.
That function creates an options structure that can cause an optimization function to behave differently when that options structure is passed into that optimization function as an input argument. If you don't pass that options structure into the optimization function, the optimization function uses its default options.

hans
hans 2016-6-10
Ah, yes I thought so. Thank You!
options = optimset('MaxFunEvals',100000,'MaxIter',10000);
BestOffset = fminsearch( @(A) QualFun(A,Per,t,P),A,options);
Is the code above fine, then?
I there a way, I can display the options used by fminsearch, as a kind of check or to see, if the application of options i made, are relevant in the process?

类别

Help CenterFile Exchange 中查找有关 Optimization 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by