title: Simulink 3D lookup table
body: <p>I have a system of three nonlinear equations with eight unknowns.  I'm currently setting each equation equal to a desired value and then using Matlab's fsolve (a numerical solver) to find a solution.  Instead of running fsolve in real-time, I'd like to pre-compute solutions for a specific set of values to which I set the equations equal.  </p>
  
  <p>Pursuant that goal, I've run the solver over a set of values and created a 3D matrix (N x N x N) which I've attempted to load into eight Simulink 3-D lookup tables, Direct Lookup Table n-D block, so I can fetch each of the eight solved unknowns.  It's my understanding the inputs to this block should work the same way I would reference an element in my 3-D array:  table(x,y,z) but I'm constantly getting Simulink table input out-of-range errors.  I've confirmed the inputs are within the table size, so I'm not sure what's wrong.</p>
  
  <p>This isn't the most elegant implementation, so I'm open to better solutions.  Ideally, I'd like to have a Simulink lookup that takes three inputs and returns a vector of the eight solved unknowns, or even better, can do some type of linear interpolation between the three lookup values to return an approximate solution.</p>
  
  <p>Thanks!</p>