title:Calculate fir coefficients with C
keywords:c,linux,fir,dsp,octave
# Calculate fir coefficients with C
## Intro
FIR filter's is probably ones of fascinating parts when you want to do with DSP,
its kind of too simple from first glance and they works. As before I have learned
about FIR and IIR
and was able to use them just from tools that take as input parameters and
give as output coefficients. Now time came just to calculate FIR from ground up.
Also C is perfect to do stuff without abstraction levels hiding details, and can
be ported to other languages and platforms. Lets calculate filter coefficients
with windows method. There is few more but those for later.
## Implementation
Low pass ideal impulse response
Impulse response of the filter
$$2f_c\frac{sin(n \omega_c)}{n \omega_c}$$
```c
for (i=0;i