33问答网
所有问题
用matlab求min f=x1^2+x2^2-x1x2-3x1 s.t=-x1-x2>=-2;x1,x2>=0
如题所述
举报该问题
推荐答案 2012-05-10
A=[1,1;-1,0;0,-1;];
B=[2,0,0];
fmincon('x(1,1)^2+x(2,1)^2-x(1,1)*x(2,1)-3*x(1)',[0;0],A,B)
极值点在x1=1.5,x2=0.5, 个人对最优化不是很熟 仅供参考
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://33.wendadaohang.com/zd/hcRWc4h55.html
相似回答
急求外惩罚函数
matlab
编程
min
f
(x)
=x
(
1
)
^2+ x
(2)^2 约束条件为
s.t
...
答:
'初始迭代点[
0;0
]fmincon(@(x)x(1)
^2+x
(2)
^2,
[0;0], [-1 -1], -1)
用MATLAB
最优化工具箱的相关函数编程求解:
minf
(
X
)
=x1+x2
s.t
. x1...
答:
【答案】:建立目标函数(ch8—612objfun.m) function f=ch8—612objfun(x)
f=x
(1)+x(2); 建立约束函数(ch8—612constr.m) function[Cceq]=ch8—612constr(x) C(1)=x(1)
^2一x
(2); C(2)
=一x
(1); ceq=[]; 建立求解程序(ch8—612.m) xO=[00]; [xf]=fmincon(‘ch8—...
matlab
三元函数(含变上限积分函数)求极值问题
答:
function f = objecfun(x)
f = x
(1)
^2 + x
(2)^2;Step 2: Write a file nonlconstr.m for the nonlinear constraints.function [c,ceq] = nonlconstr(x)c = [-x(1)
^2 - x
(2)^2 + 1;-9*x(1)^2 - x(2)^2 + 9
;
-x(1)^2 + x(2);-x(2)^2 + x(1)];ceq = ...
大家正在搜
matlab max min
matlab中exitflag
matlab nargin
matlab fminunc
randperm matlab
matlab repmat
matlab中subplot
matlab figure
matlab diag
相关问题
matlab求解min((6+x1+x2)^2+(2-3x1...
matlab如何 用穷举法求方程 f=(x1+2*x2-7)...
Min f (x)=-(x1^2/(4*pi)+x2*x3)...
x1+x2+x3=1,且x1,x2,x3>0,用matlab...
求matlab实现最速下降法求f(x1,x2)=3x1^2+...
matlab 定义函数 f(x1,x2)=100(x2-x1...
运用matlab中的fmincon程序求 MinZ=(x1-...