matlab 非线性规划

来源:百度知道 编辑:UC知道 时间:2024/05/17 07:15:29
如何在 s.t中 输入条件 Rj=Lj (j是1-15的数字)
还有 如何表示 ∑
怎么没人啊

matlab有专门的优化工具箱,可以用来解决非线性规划问题。建议你最好看下具体的函数设置,比如fmincon函数:
FMINCON attempts to solve problems of the form:
min F(X)
subject to: A*X <= B, Aeq*X = Beq (linear constraints)
C(X) <= 0, Ceq(X) = 0 (nonlinear constraints)
LB <= X <= UB (bounds)
你可以按照他要求输入约束条件。
另外,对于图中的求和问题,其实就是sum(sum((C.*X)))
不信的话,你可以用下面的小程序验证一下:
A=magic(5)
B=rand(5)
s1=sum(sum(A.*B))
s2=0;
for i=1:5
for j=1:5
s2=s2+A(i,j)*B(i,j);
end
end
s2