unpfun1.m

来自「清华大学运筹学课件」· M 代码 · 共 24 行

M
24
字号
% the program is with the unconstrained nonlinear programming
% please input the parameter matrices and the standard form of the matlab optimization

% The programming is to solve a particular example of unconstrained nonlinear programmming!

 % min e^(-x)+x^2

function f=unpfun1(x)

% if you debug , you can use the three input

% input('The program is with the unconstrained nonlinear programming')

%x=input('please input the initial number of the pivot element x=')

%input('Please Use the standard form in the toolbox:')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

f = 3*x(1)^2 + 2*x(1)*x(2) + x(2)^2;    % Cost function



⌨️ 快捷键说明

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