title: Multiplication of data in MATLAB
body: <p>I have 3 datasets in one 40×7 double data set and I want to multiply these and plot the result over a time period. My question is how to do that.</p>
  
  <p>My attempt has been to divide the datasets into 3 individual cells of data and call them <code>A</code>, <code>B</code> and <code>C</code> (each with 40×3) by using the operator <code>a=[{A}]</code> and so on.<br>
  Next, I multiplied them with each other by using <code>.*a.*b.*c</code> and with the time <code>t=[0:40]</code> (which is the x-axis).</p>
  
  <p>I get the following error and I don't know what to do.</p>
  
  <blockquote>
    <p>Index exceeds matrix dimensions</p>
  </blockquote>
  
  <p>Anyone that can help me?</p>
  
  <hr>
  
  <p><em>Code as provided by OP in a <a href="https://stackoverflow.com/questions/38243939/multiplication-of-data-in-matlab#comment63909535_38243939">comment</a>:</em></p>
  
  <pre><code>a = ans(:,1:3);
  b = ans(:,4:6);
  c = ans(:,7:9);
  A[{xyz}];
  B=[{a}];
  C=[{c}];
  t=[0:41];
  D=(A.*B.*C);
  plot(D,t);
  </code></pre>