function x=tableau(a,b,z) % %Author: David Ivers [m,n]=size(a); if m ~= length(b) error('Number of rows of A and b do not match.') end; if n ~= length(z) if n == length(z) - length(b) fprintf('Big M method:\n') x=[1 -z zeros(1,1) ; zeros(m,1) a eye(m) b; zeros(1,n+m+2)]; else error('Number of columns of A and z do not match.') end; else x=[1 -z zeros(1,m+1) ; zeros(m,1) a eye(m) b; zeros(1,n+m+2)]; end; t=displaytableau(x);