trusted
69
edits
(→Simple recursive implementation: +2D case) |
|||
Line 56: | Line 56: | ||
7.850462E¯17 | 7.850462E¯17 | ||
</source> | </source> | ||
2-dimensional FFT and inverse 2D FFT: | |||
<source lang=apl> | |||
fft2D←{⍉(fft⍤1)⍉(fft⍤1)⍵} | |||
ifft2D←{(≢∊⍵)÷⍨+fft2D+⍵} | |||
</source> | |||
Sample usage: | |||
fft2D 2 2⍴⍳4 | |||
10 ¯2 | |||
¯4 0 | |||
ifft2D fft2D 2 2⍴⍳4 | |||
1 2 | |||
3 4 | |||
=== Dyalog APL === | === Dyalog APL === |