title: how to output all the iteration results from a FOR loop into matrix and plot the graph
body: <p>I have two <code>for</code> loops in a nested format. My second loop calculates the final equation. The display of the result is outside the second loop in order to display when the second loop is complete. </p>
  
  <p>Below is the logic I used in MATLAB. I need to plot graph of <code>eqn2</code> vs x. </p>
  
  <pre><code>L=100
  for x=1:10
      eqn1
         for y=1:L
            eqn2
         end 
         value = num2strn eqn2
         disp value
  end
  </code></pre>
  
  <p>Currently the problem I am facing is that value or output of <code>eqn2</code> is always replaced after each cycle until <code>x</code> reaches 10. Hence, the workspace table of <code>eqn2</code> and value only shows the last value. My intention is to document all the output values of <code>value</code> in every cycle of x from 1:10. </p>
  
  <p>How can I do this?</p>