P
P
Pavel Prisnyakov2017-06-01 00:39:37
Eclipse
Pavel Prisnyakov, 2017-06-01 00:39:37

How to build frequency response in "C" language in eclipse for microcontroller?

We need an algorithm to transform the data array (Fast Fourier Transform). This code should work in eclipse. Please help. In fact, I only need this fast fourier transform algorithm. The problem is that nothing from the Internet is suitable, because it cannot distinguish between the sin (), sqrt () functions, etc., even with the connected math.h library. Please help, I'm already tired of it and it doesn't work.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2017-06-01
@jcmvbkbc

because it cannot distinguish the functions sin(), sqrt(), etc. even with the included math.h library

Mathematics, of course, is better to understand. For example, try to slip the -lm key to the linker.
But in truth, you don't need the sin and cos functions, you only need their values ​​for fixed arguments. The value table can be filled in and displayed anywhere and used as an array in the code executed on the controller.

R
res2001, 2017-06-01
@res2001

In general, there are free FFT implementations, offhand: fftw and fftpack.
fftpack - in Fortran.
At one time, I used this implementation. This is a standard complex FFT. It assembles without problems (math.h, of course, should work for you or implement sin and cos yourself). True, 2 different arrays are used there for the real and imaginary parts, while now they use a structure to represent complex numbers. But this, I think, is easy to fix.
And about your problems with math.h it's not very clear. I think we need to deal with them anyway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question