function x = lpmatlab(A,b,c);
[m,n] = size(A);
if size(b) ~= [m,1] | size(c) ~= [n,1]
   error('dimension mismatch')
end;
Amatlab = [full(A); -eye(n)];  % bug in Matlab code: handles sparse matrices
 % incorrectly so have to turn it into full!  
 % Also, Matlab's standard form does not include x >=0, so add it explicitly
bmatlab = [b; zeros(n,1)];
cmatlab = -c;    % Matlab's standard form uses min instead of max
x = lp(cmatlab,Amatlab,bmatlab); % it's possible to get y as well with a
  % more complicated calling sequence
