上海交通大学:《线性规划与非线性规划》教学资源_Matlab优化函数_NLP-ex

NLP E Example
NLP Example

Unconstrained Example
Unconstrained Example

fminunc Consider the problem of finding a set of values [x1,x2]that solves Minimize f(x) X =ex1(4x,2+2x22+4xx2+2x2+1)
fminunc • Consider the problem of finding a set of values [x1, x2] that solves Minimize f ( x ) x =ex1 ( 4x 1 2 +2x 2 2 +4x 1 x 2 +2x 2 +1 )

To solve this two-dimensional problem, write an M-file that returns the function value Then,invoke the unconstrained minimization routine fminunc
• To solve this two-dimensional problem, write an M-file that returns the function value • Then, invoke the unconstrained minimization routine fminunc

Step 1:Write an M-file objfun.m function f objfun(x) f=eXp(x(1)*(4*x(1)2+2*x(2)^2+ 4*x(1)*x(2)+2*X(2)+1)
Step 1: Write an M-file objfun.m function f = objfun(x) f=exp(x(1))*(4*x(1)^2+2*x(2)^2+ 4*x(1)*x(2)+2*x(2)+1)

Step 2:Invoke one of the unconstrained optimization routines xO [-1,1];Starting guess ·options optimset('LargeScale','off); [x,fval,exitflag,output] fminunc(@objfun,x0,options);
Step 2: Invoke one of the unconstrained optimization routines • x0 = [-1,1]; % Starting guess • options = optimset('LargeScale','off'); • [x,fval,exitflag,output] = fminunc(@objfun,x0,options);

After 40 function evaluations,this produces the solution X= 0.5000-1.0000 The function at the solution x is returned in fval. fval 1.3030e-10 The exitflag tells if the algorithm converged.An exitflag 0 means a local minimum was found. exitflag 1
• After 40 function evaluations, this produces the solution x = 0.5000 -1.0000 • The function at the solution x is returned in fval. fval = 1.3030e-10 • The exitflag tells if the algorithm converged. An exitflag > 0 means a local minimum was found. exitflag = 1

Note When more than one local minimum exists, the initial guess for the vector [x1,x2] affects both the number of function evaluations and the value of the solution point
Note • When more than one local minimum exists, the initial guess for the vector [x1, x2] affects both the number of function evaluations and the value of the solution point

Nonlinear Inequality Constrained Example
Nonlinear Inequality Constrained Example

fmincon For example,find x that solves Minimize f(x =exl (4x 2 +2x22 X +4x1x2+2x2+1) subject to the constraints x1X2一X1一尤2 ≤-1.5 x12≥-10
fmincon • For example, find x that solves • Minimize f ( x ) = ex 1 ( 4 x 1 2 +2 x 2 2 x +4 x 1 x 2 +2 x 2 +1 ) • subject to the constraints x 1 x 2 –x 1 – x 2 ≤ –1.5 x 1 x 2 ≥ – 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 上海交通大学:《线性规划与非线性规划》教学资源_Matlab优化函数_MATLAB初步_优化2003.doc
- 上海交通大学:《线性规划与非线性规划》教学资源_Matlab优化函数_linprog.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_ILOG实验指导_运筹学实验指导书(2012-10).doc
- 上海交通大学:《线性规划与非线性规划》教学资源_ILOG实验指导_注册激活我们的ILOG方法.pptx
- 上海交通大学:《线性规划与非线性规划》教学资源_ILOG实验指导_接受实验报告邮箱地址.pptx
- 上海交通大学:《线性规划与非线性规划》教学资源_ILOG实验指导_优化软件ILOG_OPL.ppt
- 上海交通大学:《线性规划与非线性规划》教学资源_ILOG实验指导_ILOG ODMS上机实验指导.ppt
- 《离散数学》课程教学资源(线性代数 linear algebra)英文教材PDF电子版.pdf
- 上海交通大学:《离散数学》课程教学资源(PPT课件)第四章 平面图与图的着色.ppt
- 上海交通大学:《离散数学》课程教学资源(PPT课件)命题逻辑的推理.pdf
- 上海交通大学:《离散数学》课程教学资源(PPT课件)Introduction(主讲:陈玉泉).ppt
- 上海交通大学:《离散数学》课程教学资源(PPT课件)第5章 谓词逻辑的等值和推理演算.ppt
- 上海交通大学:《离散数学》课程教学资源(PPT课件)第二章 命题逻辑的等值和推理演算.ppt
- 上海交通大学:《离散数学》课程教学资源(PPT课件)第五章 树及二叉树 Algorithms and DataStrucstures.ppt
- 上海交通大学:《离散数学》课程教学资源(PPT课件)第七章 图.ppt
- 上海交通大学:《离散数学》课程教学资源(试卷习题)历届考试试题_试卷(A卷)答案.doc
- 上海交通大学:《离散数学》课程教学资源(试卷习题)历届考试试题_试卷(A卷)试卷.doc
- 上海交通大学:《离散数学》课程教学资源(讲义)第五章 谓词逻辑的等值和推理演算.pdf
- 上海交通大学:《离散数学》课程教学资源(讲义)第二章 题逻辑的等值与推理演算.pdf
- 上海交通大学:《离散数学》课程教学资源(讲义)第一章 命题逻辑的基本概念.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_非线性规划、无约束问题.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第1章 线性规划与单纯形法 第1节 线性规划问题及其数学模型.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第1章 线性规划与单纯形法 第2节 线性规划问题的几何意义.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第1章 线性规划与单纯形法 第3节 单纯形法.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第1章 线性规划与单纯形法 第4节 单纯形法的计算步骤.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第1章 线性规划与单纯形法 第5节 单纯形法的进一步讨论.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第1章 线性规划与单纯形法 第6节 应用举例.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第2章 对偶理论和灵敏度分析 第1节 单纯形法的矩阵描述.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第2章 对偶理论和灵敏度分析 第3节 对偶问题的提出.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第2章 对偶理论和灵敏度分析 第4节 线性规划的对偶理论.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第2章 对偶理论和灵敏度分析 第5节 对偶问题的经济解释——影子价格 第6节 对偶单纯形法.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第2章 对偶理论和灵敏度分析 第7节 灵敏度分析 第8节 参数线性规划.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第3章 运输问题 第1节 运输问题的数学模型 第2节 表上作业法.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第3章 运输问题 第3节 产销不平衡的运输问题及其求解方法 第4节 应用举例.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第4章 目标规划 第1节 目标规划的数学模型 第2节 解目标规划的图解法.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_第4章 目标规划 第3节 解目标规划的单纯形法 第4节 灵敏度分析 第5节 应用举例.pdf
- 上海交通大学:《线性规划与非线性规划》教学资源_运筹学绪论.pdf
- 上海交通大学:《离散数学》课程教学资源(讲义)第四章 谓词逻辑的基本概念.pdf
- 上海交通大学:《离散数学》课程教学资源(PPT课件)数理逻辑——第9章 集合.ppt
- 高等教育出版社:《数学史通论》教学教材电子书(翻译版)A History of Mathematics An Introduction [数学史通论·第二版].(美)维克多·J·卡茨.pdf