Git Product home page Git Product logo

fft-cpp's Introduction

FFT-cpp

Fourier Analysis is one of the most important tools used in signal processing. This work is merely an implementation of the Fast Fourier Transform Algorithm which is used to compute the Discrete Fourier Transform more efficiently. Compared to the original DFT computation, the FFT Algorithm has a computational complexity that is in the order of Nlog2(N). i.e.: O(Nlog2(N)). Whilst the DFT is in the order of N^2. i.e.: O(N^2)

Prerequisites

The following are the required dependencies:

1-std library
2-Eigen library(Added to repository)
3-Matplotlibcpp(For running the test example)
4-Python3(For running the test example)

Sample Output

input signal is sin function of frequency of 100 Hz, sampling frequency is 10240 Hz.

the input signal has been sampled for 6 periods.

Both (time/frequency)-domain representations of the input signal is depicted in the figure below alt text

Running the tests

Using CMake

clone this repository then switch to it's root directory and run the following commands:

mkdir build && cd build
cmake ..
cmake --build .
./program

Using GCC

compile the main.cpp file with FFT.cpp using:

g++ main.cpp src/FFT.cpp -I<path to python3.6m> -lpython3.6m

in my machine:

g++ main.cpp src/FFT.cpp -I/usr/include/python3.6m -lpython3.6m

Built With

Acknowledgments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.