Code covered by the BSD License  

Highlights from
MatLab Solutions: "Introduction to Digital Signal Processing: A Computer Laboratory Textbook".

image thumbnail

MatLab Solutions: "Introduction to Digital Signal Processing: A Computer Laboratory Textbook".

by

 

29 Oct 2012 (Updated )

These files are the MatLab solutions of exercises contained in the above DSP lab textbook.

interpolator(x,h,L)
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.
% Inputs: 
%              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);

Contact us