title: (Matlab) Symbolic Toolbox: (Empty Sym) error in function file
body: <p>I have had the opportunity to obtain the following code as answer to my earlier question. </p>
  
  <pre><code>function [] = calc_third(varname_1, var_value_1, varname_2, var_value_2)
  
      gamma = sym('gamma');
      M1 = sym('M1');
      TR = sym('TR');
  
      eq = TR ==(((gamma - 1)*M1^2 + 2)*(2*gamma*M1^2 - gamma + 1))/(M1^2*(gamma + 1)^2);
  
      subs_eq = (subs(eq,[sym(varname_1), sym(varname_2)],[var_value_1,var_value_2]));
  
      missing_var = symvar(subs_eq)
  
      solve(subs_eq,missing_var)
  
  end
  </code></pre>
  
  <p>It is supposed to give an output below in console:</p>
  
  <pre><code>&gt;&gt;calc_third('gamma', 0.5, 'TR', 100)
  
  missing_var =
  
  M1
  
  ans =
  
  (2*2^(1/2))/(3*88609^(1/2) + 893)^(1/2)
  </code></pre>
  
  <p>Instead, Matlab gives me the following error:</p>
  
  <pre><code>&gt;&gt; calc_third('gamma',1.4,'TR',100)
  
  missing_var = 
  
     Empty cell array: 0-by-1
  
  Warning: List of equations is empty. 
  &gt; In solve at 70
    In calc_third at 13
  
  ans =
  
  [ empty sym ]
  </code></pre>
  
  <p>I am on Matlab 7.12.0 (R2011a), with symbolic toolbox.Have I miss anything out?</p>