matlab - Unable to apply coefficient of Kaiser window in C++ visual studio 2010 -
i trying pass data through low pass filter having cutoff frequency 1 hz in c++ visual studio 2010. design kaiser window through matlab , 20 coefficient. here matlab code:-
fc = 1; % cutoff frequency 1 hz wn = (2/fs)*fc; b = fir1(20,wn,'low',kaiser(21,3));
now i, got this link low pass filter. here code given in link.
/* c function implementing simplest lowpass: * * y(n) = x(n) + x(n-1) * */ double simplp (double *x, double *y, int m, double xm1) { int n; y[0] = x[0] + xm1; (n=1; n < m ; n++) { y[n] = x[n] + x[n-1]; } return x[m-1]; }
but don't know how apply coefficient of kaiser window in given example in link. so, please tell me how this.
Comments
Post a Comment