![](https://csdnimg.cn/release/download_crawler_static/87128105/bg1.jpg)
实验报告 11
实验名称:用 MATLAB 解二次型规划和一般非线性规划问题
实验目的:学会如何运用 MATLAB 解二次型规划和一般非线性规划问题;
实验内容:
书 P211
11、试求解下面的二次型规划问题。
min 2x
1
4x
1
x
2
4x
2
6x
1
3x
2
x
1
x
2
3
x s.t.
4x
1
x
2
9
x 0
1,2
解:
>> f=[-6,-3];H=[4,-4;-4,8];
>> A=[1,1;4,1];B=[3,9];Aeq=[];Beq=[];xm=zeros(2,1);
>> [x,f_opt]=quadprog(H,f,A,B,Aeq,Beq,xm,[],[])
Warning: Your Hessian is not symmetric. Resetting H=(H+H')/2.
> In quadprog at 232
Warning: Large-scale method does not currently solve this problem formulation,
using medium-scale method instead.
> In quadprog at 263
Optimization terminated.
x =
1.9500
1.0500
f_opt =
-11.0250
12、试求解下面的非线性规划问题。
2 2
min e
x
1
4x
1
2x
2
4x
1
x
2
2x
2
1
2 2