hai,, i am rashmi,, doing mtech,,
can u plz guide me to write c code for fir filter design ,,,
any 1 plz reply.......
where can i get gudance about c code to fir filter designops8-O
thanks for the reply sir,, ya i know to design the FIR filter,, but how to write c code to that design,, kindly can u send me u r personal mail id,,, so that i can get inputs from u
It is better to discuss here so that others can contribute or learn as well.
If you have a fir filter like this y = 0.5x + 0.5x(n-1)
it can be written in C like this:
Code:
//Example signal to be filtered
int x[] = {0, 10, 20, 30, 40, 50 ,60};
//Resulting signal
int y[7];
//Counter
int i;
for (i=0; i<7; i++)
{
if (i>=1)
y[i] = 0.5*x[i] + 0.5*x[i-1];
else
y[i] = 0.5*x[i];
}
//y[] now consists of the filtered signal
is it advisable to write filter programs in C or MATLAB ?
i have 2 implement a filter coefficients optimization algorithm.
is it better to write it in C or MATLAB? Later for giving inputs, wwhich is easier ?
is it advisable to write filter programs in C or MATLAB ?
i have 2 implement a filter coefficients optimization algorithm.
is it better to write it in C or MATLAB? Later for giving inputs, wwhich is easier ?
It depends, per example, if you have a DSP and you need to know whats going in with your filter, you can use Matlab to see whats happening, and then write the C code for your DSP. In your case, you are implementing an algorithm, i suggest to use Matlab first.
It depends, per example, if you have a DSP and you need to know whats going in with your filter, you can use Matlab to see whats happening, and then write the C code for your DSP. In your case, you are implementing an algorithm, i suggest to use Matlab first.
thank you very much.i got the code. since am a beginner in this processor.i have seen that three pages of code . its written like for actual implementation the code should be split into several files. i am really confused where to split and what all things to be done after getting this code. how will i simulate this. i have heard that an IAR embedded workbench c/c++ compiler is used. if so,how it is used. i need the steps.kindly help me..please..