Solution: c = [-10-9];
a =[6 5; 10 20; 1 0];
b =[60; 150; 8];
aeq =[]; beq =[];
vlb =[0; 0]; vub =[];
[x,fval]=linprog(c,A,b,Aeq,beq,vlb,vub)
Operation result: > > xxghzy 1 Optimization terminated successfully.
x =6.4286 4.2857
fval =- 102.857 1
( 1):
(2): Solution: c = [-11-9];
a =[6 5; 10 20; 1 0];
b =[60; 150; 8];
aeq =[]; beq =[];
vlb =[0; 0]; vub =[];
[x,fval]=linprog(c,A,b,Aeq,beq,vlb,vub)
Running results:
Optimization terminated successfully. x = 8.0000 2.4000
Fval =-109.6000 It can be seen that the production plan should be changed.