title: why is the vector coming out of 'trapz' function as NAN?
body: <p>i am trying to calculate the inverse fourier transform of the vector XRECW. for some reason i get a vector of NANs.
  please help!!</p>
  
  <pre><code>t = -2:1/100:2;    
  x = ((2/5)*sin(5*pi*t))./((1/25)-t.^2);    
  w = -20*pi:0.01*pi:20*pi;    
  Hw = (exp(j*pi.*(w./(10*pi)))./(sinc(w./(10*pi)))).*(heaviside(w+5*pi)-heaviside(w-5*pi));%low  pass filter     
  xzohw = 0;    
  for q=1:20:400
      xzohw = xzohw + x(q).*(2./w).*sin(0.1.*w).*exp(-j.*w*0.2*((q-1)/20)+0.5);%calculating fourier transform of xzoh    
  end    
  xzohw = abs(xzohw);     
  xrecw = abs(xzohw.*Hw);%filtering the fourier transform  high frequencies    
  
  xrect=0;
  for q=1:401
  
      xrect(q) = (1/(2*pi)).*trapz(xrecw.*exp(j*w*t(q))); %inverse fourier transform
  end
  xrect = abs(xrect);
  plot(t,xrect)
  </code></pre>