brendanashworth / fft-small Goto Github PK
View Code? Open in Web Editor NEWcooley-tukey 2-radix discrete fast fourier transform in C for embedded systems
License: MIT License
cooley-tukey 2-radix discrete fast fourier transform in C for embedded systems
License: MIT License
Great work on this DFT and FFT implementation into a one piece of usable code for an embedded platform. Unfortunately, I don't understand how can I see the calculation result after putting my data into fft(int* x, double complex* X, uint16_t N) function?
Hey Brendan ! Thx for opensourcing this amazing implementation!
I'm learning FFT and trying to find some C implementations then I found yours!
I generated a 50Hz sine wave(y=2sin(2pi50t)(under 1200hz sample rate and I sampled the first period of 0~0.02s signals) and tried radix2 on the first try. I changed the FFT input of int* x to double* x to fit my float inputs.
But the calculated modulus doesn't come as expected. While I'm confused I tried fft_slow then it's 100% accurate.
fft radix2:
fft_slow:
I don't know if I'm coding it wrong...Appreciate any help!
Here's my code(Based on 'test.c'.)
https://gist.github.com/2ndMessiah/03f875c8fba6f790cdefebb187c37c9e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.