title: Solving for variables in an over-parameterised system
body: <p>I am trying to write a Matlab program that accepts variables for a system from the user, but there are more variables than system parameters. To be specific, six variables in three equations:</p>
  
  <pre><code>w - d - M = 0
  l - d - T = 0
  N - T + M = 0
  </code></pre>
  
  <p>This could be represented in matrix form as <code>A*x=0</code> where</p>
  
  <pre><code>A = [1  0  0 -1  0 -1;
       0  1  0 -1 -1  0;
       0  0  1  0 -1  1];
  
  x = [w  l  N  d  T  M]';
  </code></pre>
  
  <p>I would like to be able to solve this system given a known subset of the variables. For example, if the user gives <code>d</code>, <code>T</code>, <code>M</code>, then the system is trivially solved for the other three variables. If the user supplies <code>w</code>, <code>N</code>, <code>M</code>, then it becomes a solvable 3-DOF system. And so on. (If the user over- or under-specifies the system then an error may of course result.)</p>
  
  <p>Given any <em>one</em> of these combinations it's simple to (a priori) use matrix algebra to calculate the unknown quantities. But I don't know how to solve the general case, aside from using the symbolic toolbox (which I prefer not to do for compatibility reasons).</p>
  
  <p>When I started with this approach I thought this step would be easy, but my linear algebra is rusty; am I missing something simple?</p>