Created
May 18, 2014 21:00
-
-
Save hessammehr/e603bf196138b496dfc3 to your computer and use it in GitHub Desktop.
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
(import '[edu.emory.mathcs.jtransforms.fft DoubleFFT_1D]) | |
(defn fft [data] (let [a-data (into-array Double/TYPE data) | |
fftfun (DoubleFFT_1D. (count data)) | |
dummy (.realForward fftfun a-data)] a-data)) | |
;; Example: Constant signal | |
(fft (take 128 (repeat 1.0))) | |
;; [optional] view the result as vector | |
(vec *1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment