Created
January 20, 2016 19:03
-
-
Save mkolod/033c70b54136a1b11f46 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # sine wave in time domain | |
| x <- seq(0, 20*pi, 0.01) | |
| y <- sin(x) | |
| plot(x, y, type='l') | |
| # inverted time domain after 2 FFT applications | |
| invertedY <- fft(fft(y)) / length(y) | |
| plot(x, invertedY, type='l') | |
| # original time domain after 4 FFT applications | |
| originalY <- fft(fft(fft(fft(y)) / length(y))) / length(y) | |
| plot(x, originalY, type = 'l') |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here I wanted to show the invertibility and periodicity of the Fourier transform.