ms_linprog - b=[6;5]; f=[1 -3 0 0]; %define lower bound...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
clear clc %question:minimize x1-3*x2 %subject to: % -x1+2*x2<=6 % x1+x2<=5 % x1,x2>=0 %SOLN: %if we write above eqn % subject Ax=b, minimize f'x %A,b,f matrix are written below A=[-1 2 1 0;1 1 0 1];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b=[6;5]; f=[1 -3 0 0]; %define lower bound values for x LB(1:4,:) = 0; %define upper bound values for x UB(1:4,:)=inf; %find the result xt=linprog(f',A,b,A,b,LB,UB)...
View Full Document

Ask a homework question - tutors are online