ex1.m

来自「linear equation routines in matlab」· M 代码 · 共 23 行

M
23
字号
function varargout = ex1(x)%% %%  [F]     = ex1(x)  returns the function value in F%  [F,Jac] = ex1(x)  returns the function value in F and %                    the Jacobian in Jac%%  Matthias Heinkenschloss%  Department of Computational and Applied Mathematics%  Rice University%  March 9, 2004%% return the function valuevarargout{1} = [ x(1)^2+x(2)^2-2;                 exp(x(1)-1)+x(2)^3-2];if( nargout > 1 )  % return the Jacobian as the second argument  varargout{2} = [ 2*x(1)                2*x(2);                   exp(x(1)-1)           3*x(2)^2];end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?