matlab:求助关于老版fmins函数如何用新版fminsearch实现的问题
发布网友
发布时间:2022-05-06 12:17
我来回答
共1个回答
热心网友
时间:2023-10-09 12:25
fmins 在matlab 6.0以后被 fminsearch代替了.
相关部分重写如下:
% options(1,1) = 0; % no print of intermediate results
% options(2,1) = 0.0001; % simplex convergence criteria
% options(3,1) = 0.0001; % convergence criteria for function value
% options(4,1) = 1000; % default number of function evaluations
% options = optimset('param1',value1,'param2',value2,...)
options = optimset('Display','off','MaxFunEvals',1000,'TolFun',0.0001);
%[mrho fvalue niter] = fmins('ar1_like',param,options,[],y,x);
[mrho,fvalue,exitflag,output] = fminsearch(@ar1_like,param,options,y,x);
niter = output.iterations