title: MATLAB symbolic equation with LUT
body: <p>I'm trying to solve an equation in MATLAB using the method of symbolic variables through the syms tool. The problem is in my equation i have a term which is function of the symbolic variable i'm trying to solve but it is not analitically defined. Instead, it is defined through a lookup table (that is a column array with my symbolic variable as index). When i try to add the term LUT(symbVariable) to my equation, i get this error:</p>
  
  <blockquote>
    <p>Invalid indexing or function definition. When defining a function, ensure that the arguments are symbolic variables and the body of the
    function is a SYM expression. <strong>When indexing, the input must be numeric, logical, or ':'</strong>.</p>
  </blockquote>
  
  <p>I suppose the problem is related with the bolded sentence. Anyone knows a way i could solve this problem? I'm not very used to matlab programming and as far i didn't find anything useful. Thank you in advantage.</p>
  
  <p>Here's a sample code of what i'm trying to explain:</p>
  
  <pre><code>syms v % definition of symbolic variable v
  eqn = myLUT(v) + v + v^2 == 0; % definition of my equation (this is the call that gives me the error)
  res = solve(eqn,v,'Real',true); % solving the equation
  </code></pre>