mtlb_filter - One-dimensional digital filter
Y=MTLB_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)
The function mtlb_filter can be replaced by the powerful SciLab function flts. mtlb_filter is just for the MatLab users starting first work with SciLab.
[B,A]=butter(8,0.1); t=0:1:999; x=rand(1,1000,'normal'); y=mtlb_filter(B,A,x); plot2d(t,x,style=3); plot2d(t,y,style=2);
butter , mtlb_freqz ,