📄 diaryex3_3.txt
字号:
help lp
LP Linear programming.
X=LP(f,A,b) solves the linear programming problem:
min f'x subject to: Ax <= b
x
X=LP(f,A,b,VLB,VUB) defines a set of lower and upper
bounds on the design variables, X, so that the solution is always in
the range VLB <= X <= VUB.
X=LP(f,A,b,VLB,VUB,X0) sets the initial starting point to X0.
X=LP(f,A,b,VLB,VUB,X0,N) indicates that the first N constraints defined
by A and b are equality constraints.
X=LP(f,A,b,VLB,VUB,X0,N,DISPLAY) controls the level of warning
messages displayed. Warning messages can be turned off with
DISPLAY = -1.
[x,LAMBDA]=LP(f,A,b) returns the set of Lagrangian multipliers,
LAMBDA, at the solution.
[X,LAMBDA,HOW] = LP(f,A,b) also returns a string how that indicates
error conditions at the final iteration.
LP produces warning messages when the solution is either unbounded
or infeasible.
c=[-6 -10 -9 -20];
A=[4 9 7 10;1 1 3 8;30 40 20 10];
b=[600 420 800];
x=[c,A,b]
x=lp(c,A,b)
Warning: The solution is unbounded and at infinity;
the constraints are not restrictive enough.
x =
1.0e+015 *
-0.0000
3.7067
-8.8391
2.8513
vlb=[0 0 0];
vub=[100,100,100];
x=lp(c,A,b,vlb,vub)
x =
0.0000
7.0968
0
51.6129
diary off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -