clear;
clc;
format short;
C=[500; 250; 950; 1250; 250; -100; 750];
f=C';
A=[1 1 1 0 0 0 0;
   0 0 0 1 1 0 0;
   0 0 0 0 0 1 1;
   -1 -1 -1 -1 -1 -1 -1]
B=[150 250 200 -500];
b=B';
Aeq=zeros(1,7);
beq=0;
LB=zeros(7,1);
UB=[150; 150; 150; 250; 250; 200; 200];
[X,J]=linprog(f,A,b,Aeq,beq,LB,UB)
