payoff_amount.m
来自「nonlinear eq routines in matlab」· M 代码 · 共 24 行
M
24 行
function varargout = payoff_amount(p)%% %% [y] = payoff_amount(x)% [y,yp] = payoff_amount(x) returns the function value in y and % the derivative in yp%% Matthias Heinkenschloss% Department of Computational and Applied Mathematics% Rice University% April 17, 2001%a = 100000;n = 20;r = 0.06;% return the function valuevarargout{1} = a*(1+r).^n - p*((1+r).^n-1)./r;if( nargout > 1 ) % return the derivative as the second argument varargout{2} = -((1+r).^n-1)./r;end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?