Fast Fourier transform: Difference between revisions

Jump to navigation Jump to search
→‎Simple recursive implementation: otherwise produces text garbage on incorrect input
(→‎Simple recursive implementation: otherwise produces text garbage on incorrect input)
Line 59: Line 59:
2-dimensional FFT and inverse 2D FFT:
2-dimensional FFT and inverse 2D FFT:
<source lang=apl>
<source lang=apl>
fft2D←{⍉(fft⍤1)⍉(fft⍤1)⍵}
fft2D←{
    ∨/0≠1|2⍟⍴⍵:'Matrix dimensions must be powers of 2'
    ⍉(fft⍤1)⍉(fft⍤1)⍵
}
ifft2D←{(≢∊⍵)÷⍨+fft2D+⍵}
ifft2D←{(≢∊⍵)÷⍨+fft2D+⍵}
</source>
</source>
trusted
69

edits

Navigation menu