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 |
NewerOlder