title: Implementing simplex algorithm and getting "matrix singular to machine precision" error
body: <p>I am implementing the (dual) simplex algorithm in Matlab/Octave.</p>
  
  <p>My algorithm works just fine for a small test problem, but as soon as I try a bigger problem as afiro.mps (from <a href="http://www.netlib.org/lp/data/" rel="nofollow">http://www.netlib.org/lp/data/</a>) I get the warning "matrix singular to machine precision, rcond=0" and octave throws an error (or does not terminate). The exact command is:</p>
  
  <pre><code>x = zeros(n,1);
  x(B) = A(:,B) \ b; % Compute primal variables
  y = A(:,B)' \ c(B); % Compute dual variables
  </code></pre>
  
  <p>The problem is in standard form</p>
  
  <pre><code>min c*x
  s.t. Ax=b
  x&gt;=0
  </code></pre>
  
  <p>A is a m-x-n matrix and B is the index vector of the inactive constraints (base variables).
  As I am doing a two phased simplex I choose 1:size(A,1) as an initial base for the dual simplex.</p>
  
  <p>The problem is read from a mps file via a self coded reader. I expect the mps file is read correctly, as the glpk function solves the problem correctly, when it has A,b,c as input parameters.</p>
  
  <p>Is there some way to avoid the warning or do I have an error in my coding?</p>