example.m
来自「最优化的bfgs算法」· M 代码 · 共 11 行
M
11 行
%example script for csminwel.m, minimizing Rosenbrock function% Get the function's own help commentsinput('Hit return to get the function''s own help comments')help csminwel% First with numberical derivatives (grad=[])input('Hit return to minimize with numerical gradient')[fhat,xhat,ghat,Hhat,itct,fcount,retcodehat] = csminwel('rsnbrck',[10,-9],eye(2)*.5,[] ,1e-14,100)% Then with analytic derivativesinput('Hit return to minimize with analytic gradient')[fhat,xhat,ghat,Hhat,itct,fcount,retcodehat] = csminwel('rsnbrck',[10,-9],eye(2)*.5,'drsnbrck' ,1e-14,100)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?