Tool/software: Code Composer Studio
x[0]=input_sample(); //input newest sample giving by DSK6416
yn = 0; //initialize filter's output
for (i = 0; i< N; i++)
yn += (h[i] * x[i]); //y(n) += h(i)* x(n-i)
for (i = N-1; i > 0; i--) //starting @ end of buffer
x[i] = x[i-1];
am not getting how convlutoin happening here...
y(n)=h(0)x(n)+h(1)x(n-1)+h(2)x(n-2)+........+h(N-1)x(n-(N-1))
but in the code yn is accumulating like yn=yn+h[i]*x[i]
yn=yn+h(0)*x(0)
yn=yn+h(1)*x(1)
yn=yn+h(2)*x(2)
.
.
.
yn=yn+h(30)*x(30)
for loop ends here
x[n]=x[n-1];
i am running this program on DSK6416
what are the initial value in x[n] if i am using TMS320C6416,filter coefficients are derived from MATLAB,Each time new sample is giving By Using TMS320C6416