function xxx=lect01fftdensity clear; % parameters for the vg model theta = -.33; sigma = .12; nu = .16; t = .25; % parameters for the cf grid (-a/2,a/2) a = 600; N = 256; b = a/N; % create grids u = ( (0:N-1) - N/2 ) * b; x = ( (0:N-1) - N/2 ) / a; % create cf and invert h = vgcf(u, theta, nu, sigma, t, 0); h2 = ((-1).^(0:N-1)) .* h; plot(u,real(h2),u,imag(h2)) g = fft(h2); g2 = real( ((-1).^(0:N-1)) .* g * b / (2*pi) ); plot(x,g2)