# Compute fourrier transform in Julia

**URL:** https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664
**Category:** Numerics
**Tags:** question
**Created:** [May 31, 2023, 10:35am UTC](https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664 "2023-05-31T10:35:16Z")
**Posts on this page:** 2
**Page:** 2

<div class="post-metadata">

### Author: ![Fourier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fourier/32/38176_2.png) [@Fourier](https://discourse.julialang.org/u/Fourier)
#### Post date: [June 5, 2023, 8:48am UTC](https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664/21 "2023-06-05T08:48:07Z")

</div>

Also I might leave these formula I found in the recommended book ([Numerical Fourier Analysis | SpringerLink](https://link.springer.com/book/10.1007/978-3-030-04306-3)) here, maybe they are usefull to someone encountering the same problem.

The discrete fourrier transform is given by:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/8/380ac819c10c43e60c3c3ed1f20fb8ecbca0ebc3.png)

Whereas if I want to actually want to approximate the fourrier transform from a dataset, it is given by:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/8/682942bd73f6c2f8c98e1f4821cef719456845ba.png)

where \omega\_{nN}^{jk} = \exp(i \dots)  
so we could see which shifts and normalisation one would need to perform.

here is the formula for the DFT used by fftw:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/d/8d6d8aee29190a0e77bc094b5d7fd565892c9608.png)

---

<div class="post-metadata">

### Author: ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)
#### Post date: [June 5, 2023, 9:07am UTC](https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664/22 "2023-06-05T09:07:16Z")

</div>

…and again be a bit careful, in the notation of said book (which I prefer) the inverse Fourier Transform has a factor of 1/N upfront, and (in theory) some prefer to also use the unitary DFT [Discrete Fourier transform - Wikipedia](https://en.wikipedia.org/wiki/Discrete_Fourier_transform#The_unitary_DFT) or put the 1/N upfront the DFT instead of the inverse. But I think the one from the book should be the most common definition.

[Previous page](https://discourse.julialang.org/t/compute-fourrier-transform-in-julia/99664.md?page=1)
