summaryrefslogtreecommitdiff
path: root/md/writeup
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2021-08-25 09:52:04 +0100
committerFreeArtMan <dos21h@gmail.com>2021-08-25 09:52:04 +0100
commit6b0a499024166602128c586e73604461828c792a (patch)
treead48345344aeb7233726c59c491a30c04678e368 /md/writeup
parent6f60605d73bb79943b940f25c6e60fb30d7c1bb0 (diff)
downloadmd-content-6b0a499024166602128c586e73604461828c792a.tar.gz
md-content-6b0a499024166602128c586e73604461828c792a.zip
Update fft implementation
Diffstat (limited to 'md/writeup')
-rw-r--r--md/writeup/naive_fft_implementation_in_c.md18
1 files changed, 15 insertions, 3 deletions
diff --git a/md/writeup/naive_fft_implementation_in_c.md b/md/writeup/naive_fft_implementation_in_c.md
index 6d7293e..80c1ea6 100644
--- a/md/writeup/naive_fft_implementation_in_c.md
+++ b/md/writeup/naive_fft_implementation_in_c.md
@@ -25,18 +25,23 @@ IOWA FFT source on implementation side.
### DFT
+Formula for most simple Discreate Fourier Transformation. Also most slowest one.
+
+Official DFT formula
$$X(k) = F_{D}[x(nT)] = $$
$$ \sum_{n=0}^{N-1} x(nT) e^{-jk\omega nT} , k=0,1,...,N-1 $$
+My wording of DFT algorithm:
+Go over data array and sumup multiplication of each "frequency" $$e^{-jk\omega nT}$$ over data array $$x(nT)$$
+
+
+
```c
void dft(double *x_i, double *x_q, int n, int inv) {
double Wn,Wk;
- //static array
- //double Xi[DATA_SIZE],Xq[DATA_SIZE];
- //dynamic array
double *Xi, *Xq;
double c,s;
int i,j;
@@ -72,6 +77,13 @@ void dft(double *x_i, double *x_q, int n, int inv) {
}
```
### FFT
+
+This is more advanced version of Fourier Transformation, with rearrangement of data there is possible to
+reduce amount of calculations and that give speed increase.
+DFT speed is
+$$ O(N^2)$$
+and FFT becomes as $$ O(N\log N) $$
+
#### Shuffling arrays
```c