title: output of for loop as a matrix MATLAB
body: <p>the following function gives as output a 3x3 matrix</p>
  
  <pre><code>S=myfunction(i,3)
  </code></pre>
  
  <p>I would like to know please if there is a way to stock the output of the following loop in a way that I can recall the matrix from each step.</p>
  
  <pre><code> for i=1:8
   S=myfunction(i,3)
   end
  </code></pre>
  
  <p>This loop at each step gives a different matrix and I would like to give a name to each matrix from each step for exampe S1, S2 , S3 .. </p>
  
  <p>Is this possible? or should I save the result in a 3 x (24) huge matrix? </p>
  
  <p>Thank you</p>
  
  <p>example of output:</p>
  
  <pre><code> for i=1:8
   S=myinfluence(i,3)
   end
  
   S = 
  
  'HH'    'HH'    'HH'
  'HH'    'HH'    'HH'
  'HH'    'HH'    'HH'
  </code></pre>