title: Matlab/Simulink LookupTable with Workspace vectors
body: <p>I am new with Simulink and I am struggling with the Dynamic Lookup Table (inputs : x, xadta, ydata; output: y).</p>
  
  <p>I have several 2D vectors (xdata and ydata) stored in my Workspace and I would like to use them in Simulink in a Dynamic Lookup Table to return a value (y) depending on another variable in Simulink (x). 
  If I understand how it works I have first to convert my 2D vectors in structures (time,values,dimensions) to be read in Simulink ?
  So I did it this way but I got an error :</p>
  
  <pre><code>    vector.time = xdata; % dimension 1x100
      vector.signals.values = ydata; % dimension 1x100
      vector.signals.dimensions = [1 100];
      save('vector.mat','vector')
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <p><em>"The last dimension of each
  'signals.values' field must be the same as the number of rows in the 'time' field."</em></p>
  
  <p>Besides I am not sure that what I am trying to do is appropriate... I use the xdata of my vectors/structures as "time" in the structures to get my vectors readable in Simulink. But I do not think it should have anything to do with time notion. I just want the Dynamic Lookup Table to return the "ydata" value of the vector/structure corresponding to the value of "x"="xdata". Only "x" change with time in the Simulation.</p>