cubici1.m
来自「本书是电子通信类的本科、研究生辅助教材」· M 代码 · 共 16 行
M
16 行
function r=cubici1(fnew,fold,graddnew,graddold,stepsize)
%CUBICI1 Cubicly interpolates 2 points and gradients to estimate minimum.
%
% This function uses cubic interpolation and the values of two
% points and their gradients in order to estimate the minimum of a
% a function along a line.
% Copyright (c) 1990 by the MathWorks, Inc.
% Andy Grace 7-9-90.
if fnew==Inf, fnew=1/eps; end
z=3*(fold-fnew)/stepsize+graddold+graddnew;
w=real(sqrt(z*z-graddold*graddnew));
r=stepsize*((z+w-graddold)/(graddnew-graddold+2*w));
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?