trusted
69
edits
(→Simple recursive implementation: +2D case) |
(→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> |