在MATLAB中用optimset替换optimoptions

时间:2016-12-24 17:55:46

标签: matlab optimization

我的MATLAB不支持 optimoptions

如何使用 optimset 重写以下例程,以便产生相同的结果?

options = optimoptions('fminunc','Display','off','OutputFcn',
                        @bananaout,'Algorithm','quasi-newton');
[x,fval,eflag,output] = fminunc(fun,x0,options);
title 'Rosenbrock solution via fminunc'
Fcount = output.funcCount;
disp(['Number of function evaluations for fminunc was ',num2str(Fcount)])
disp(['Number of solver iterations for fminunc was ',num2str(output.iterations)])

0 个答案:

没有答案