Joel said:
boki said:
We calculate the IIR filter coefficient by
h(kt)=(2fc/fs)(sin{r(k)}/r(k))
r(k)=2*pi*fc*[k-(N-1)/2]/fs, k=0,1,2,3,....
pi=3.14159
but, how these equations come from?
A book from Mitra or Oppenheim?
LOL. "A book" is where everyone but boki gets them.
Matlab can design many different discrete time filters for you... try out
'fdatool' if you have Matlab at your disposal.
Not everyone with MATLAB has FDATOOL, since it is in an add-on toolbox
(SIGNAL in this case). Everyone who has MATLAB does have FILTER.
C:\math\MATLABx.x\Pro6\toolbox\signal\fdatoolgui\fdatool.m
FILTER One-dimensional digital filter.
Y = FILTER(B,A,X) filters the data in vector X with the
filter described by vectors A and B to create the filtered
data Y. The filter is a "Direct Form II Transposed"
implementation of the standard difference equation:
a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
- a(2)*y(n-1) - ... - a(na+1)*y(n-na)
If a(1) is not equal to 1, FILTER normalizes the filter
coefficients by a(1).
FILTER always operates along the first non-singleton dimension,
namely dimension 1 for column vectors and non-trivial matrices,
and dimension 2 for row vectors.
[Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final
conditions, Zi and Zf, of the delays. Zi is a vector of length
MAX(LENGTH(A),LENGTH(B))-1 or an array of such vectors, one for
each column of X.
FILTER(B,A,X,[],DIM) or FILTER(B,A,X,Zi,DIM) operates along the
dimension DIM.
See also FILTER2 and, in the Signal Processing Toolbox, FILTFILT.
Overloaded methods
help cas/filter.m
help dfilt/filter.m
help par/filter.m