title: How to create a 2D array inside a 'for' loop in matlab
body: <p>I am new to matlab and I am trying to calculate ifft transform of vector Y for z=1:100.</p>
  
  <p>Here is the current version of the relevant part of the code (no array): </p>
  
  <pre><code>for z=1:100
  Y=(exp(kx.^2))*(exp(i*z/2*k0)).*PSIX_0;
  psix_z=ifft(Y);
  end
  </code></pre>
  
  <p>where:
  PSIX_0 and kx are both 1x100 arays.
  k0 is a constant.</p>
  
  <p>All I can see now is the last row for z=100. Is there a way to recive a ifft of vector Y for each value of z?</p>
  
  <p>Thanks! </p>