Created
October 6, 2016 18:50
-
-
Save samstewart/91525e7262fe251116819d293a1a99da to your computer and use it in GitHub Desktop.
Plots the Fourier modes with K sample points.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% simple script that allows one to plot the Fourier modes. % The modes should be given in Terry Tao's notation so that | |
% u = \sum_{i = 1}^N exp(2 \pi n xi) \hat{u}_n | |
% For example, cos would be given as [0 1/2] | |
function plot_fourier_modes(K, modes) | |
plot(fourier_linspace(0, 2*pi, 2*K + 1), ifft(full_fourier_spectrum(K, modes))); grid on; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment