clear all; % Grid: L = 20; N = 2^8; x2 = linspace(-L/2,L/2,N+1); x = x2(1:N); k = 2*pi/L*[0:(N/2-1) (-N/2):-1]; % omega = 1; f = exp(-x.^2); ft = fft(f); % yt = ft./(k.^2+omega); y = ifft(yt); plot(x,y);