MatLab Solutions: "Introduction to Digital Signal Processing: A Computer Laboratory Textbook".
29 Oct 2012
25 Nov 2013)
These files are the MatLab solutions of exercises contained in the above DSP lab textbook.
function y = interpolator(x,h,L)
% This function performs interpolation on the input signal x[n]
% by a factor L, using the low-pass filter h.
% x is a row vector containing the signal to be interpolated.
% h is a row vector containing the low-pass filter to be used
% for interpolation (designed externally with Gain = L and cutoff freq.= pi/L).
% L is the interpolation factor.
% First, upsample the input signal x[n] by a factor L:
xup = my_upsample(x,L);
% Next, pass the upsampled signal xup through the low-pass filter h:
y = conv(xup,h);