# How to use Fourier Filter on Complex Data

**URL:** <https://discourse.julialang.org/t/how-to-use-fourier-filter-on-complex-data/54967>\
**Category:** Signal and Image Processing\
**Tags:** question, fftw, dsp\
**Created:** [February 10, 2021, 6:00am UTC](https://discourse.julialang.org/t/how-to-use-fourier-filter-on-complex-data/54967 "2021-02-10T06:00:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [February 10, 2021, 1:38pm UTC](https://discourse.julialang.org/t/how-to-use-fourier-filter-on-complex-data/54967/3 "2021-02-10T13:38:30Z")

</div>

For the Fourier decomposition of a signal as a sum of sinusoidal functions, you may take a look at example [here](https://discourse.julialang.org/t/extracting-fourier-coefficients-of-an-arbitrary-periodic-signal/51036/8).

To process your signal in the frequency domain, you can use the [DSP.jl](https://github.com/JuliaDSP/DSP.jl) package to filter out the higher frequency components of your “noisy” dataset:

```julia
using DSP, Plots
x = 1:1:10
y = [-1.0,5,0,2,-7,1,6,9,-2,3.0]
fs = 1.0; # sampling frequency
fc = 0.35; # frequency cutoff, less than Nyquist
responsetype = Lowpass(fc, fs=fs)
designmethod = FIRWindow(hamming(10))
filty = filtfilt(digitalfilter(responsetype, designmethod), y)
plot(x, y, label = "input", legend=:topleft)
plot!(x, filty, label = "filtered")

```

![filtered_signal](https://global.discourse-cdn.com/julialang/original/3X/3/f/3f86bb07d4de4833e6824e248a7d924963ee2bab.png)

_PS: it goes without saying, the input array provided is pretty short._

---

_[View the full topic](https://discourse.julialang.org/t/how-to-use-fourier-filter-on-complex-data/54967)._
