title: Incorrect results in Simulink model when using data 'from workspace' block
body: <p>I am facing a problem using the data imported into the workspace for my Simulink blocks.</p>
  
  <p>My Case:</p>
  
  <p>I did a simple block diagram to simulate the results before implementing this method to the actual Simulink blocks. I made use of a 'From workspace' block to read in the data and a scope to observe the output. These are the settings:</p>
  
  <pre><code>t=0:22/565:22
  a.time=t
  a.signals.values=ddata   %ddata contains [565x1] datas
  a.signals.dimensions=1;
  </code></pre>
  
  <p>I realized that the results in the scope doesn't match the data.</p>
  
  <p>I found out that on this website (<a href="http://blogs.mathworks.com/seth/2012/02/09/using-discrete-data-as-an-input-to-your-simulink-model/" rel="nofollow">http://blogs.mathworks.com/seth/2012/02/09/using-discrete-data-as-an-input-to-your-simulink-model/</a>) the steps taken by the Simulink solver are different from the ones specified in the input time vector.</p>
  
  <p>Attempt to solve:</p>
  
  <p>I set the time vector to zero but there is an error.</p>
  
  <pre><code>a.time=[];
  </code></pre>
  
  <p>Error: "Invalid continuous sample time specified for'test/From Workspace'. Continuous sample time is not permitted when the input from workspace is a structure with no time data. To eliminate this error, select a discrete sample time or change the input data to include time data. "</p>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>How do I resolve this error without using time vector?</p></li>
  <li><p>What is the best way to read one row for each time step into the Simulink block instead of a whole list of data?</p></li>
  </ol>
  
  <p>I greatly appreciate if anybody can provide insight/solutions/alternative method to my case.</p>