Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit | ![]() ![]() |
MATLAB Syntax
Y = mot566_decimate(X,R,N) Y = mot566_decimate(X,R,'FIR') Y = mot566_decimate(X,R,N,'FIR')
Description
The mot566_decimate function resamples the input X at an integer rate R times slower than the input sample rate, where R is defined as Decimation factor parameter. This process consists of two steps:
The mot566_decimate function implements the FIR filtering and downsampling steps together using a polyphase filter structure, which is more efficient than straightforward filter-then-decimate algorithms. The output of the decimator is the first filter phase.
mot566_decimate filters the data with an eighth order Chebyshev type I lowpass filter with cutoff frequency, 8*(Fs/2)/R, before resampling.
mot566_decimate(X,R,N) uses an Nth order Chebyshev filter.
mot566_decimate(X,R,'FIR') uses the 30 point FIR filter generated by
FIR1(30,1/R) to filter the data.
mot566_decimate(X,R,N,'FIR') uses the N-point FIR filter.
NOTE: For large R, the Chebyshev filter design might be incorrect due to numeric precision limitations. In this case mot566_decimate will use a lower filter order. For better anti-aliasing performance, try breaking R up into its factors and calling mot566_decimate several times.
Characteristics
In the workspace, if the input is:
X=[0.0682 0.0302 0.0541 0.0150 0.0697 0.0378 0.0860 0.0853 0.0593 0.0496 0.0899 0.0821 0.0644 0.0818 0.0660 0.0342 0.0289 0.0341 0.0534 0.0727] R=3 N=8 mot566_decimate(X,R,N,'fir')
ans=0.0682 0.0406 0.0705 0.0674 0.0756 0.0441 0.0541
Arguments
X
Vector (or matrix) with elements normalized in the range [-1,1] (for complex elements, both real and imaginary parts should comply with this limit). Length of X should keep larger than two times of N+1.
Decimation factor (integer) by which to decrease the sample rate of the input sequence.
NSee Also
mot566_interp
![]() | mot566_conv | mot566_diff | ![]() |