Motorola DSP Developer's Kit | ![]() ![]() |
Upsample and filter an input signal.
MATLAB Syntax
Y = mot566_interp(X,R,N) Y = mot566_interp(X,R,L,ALPHA) [Y,B] = mot566_interp(X,R,L,ALPHA)
Description
mot566_interp(X,R) resamples the sequence in vector X at R times the original sample rate. The resulting resampled vector X is R times longer, mot566_length(Y) = R*mot566_length(X).
A symmetric filter, B, allows the original data to pass through unchanged and interpolates between so that the mean square error between them and their ideal values is minimized.
mot566_interp(X,R,L,ALPHA) allows specification of arguments L and ALPHA which otherwise default to 0.4 and 0.5 respectively. 2*L is the number of original sample values used to perform the interpolation. Ideally L should be less than or equal to 10. The length of B is 2*L*R+1. The signal is assumed to be band limited with cutoff frequency 0 < ALPHA<= 1.0.
[Y,B] = mot566_interp(X,R,L,ALPHA) returns the coefficients of the interpolation filter B.
Characteristics
In the workspace, if the input is:
X=[0.5641 0.4093 0.7053 0.6748 0.7565 0.4412 0.5435] Alpha=0.34 R=2 L=3 [Y,B]=mot566_interp(X,R,L,Alpha)
Y=[0.5641 0.4514 0.4093 0.5476 0.7053 0.7076 0.6748 0.7392 0.7565 0.5978 0.4412 0.4552 0.5435 0.5966 B= -0.0000 0.0162 0 -0.1095 0.0000 0.5934 1.0000 0.5934 0.0000 -0.1095 0 0.0162 -0.0000
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 remain larger than two times L+1
Interpolation factor (integer) by which to increase the sample rate of the input sequence.
ALPHASee Also
mot566_decimate
![]() | mot566_ifft | mot566_length | ![]() |