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.

my_upsample(x,N)
function y = my_upsample(x,N)
% This function performs upsampling to input row vector x
% by a factor of N. It is written in such a way as to agree with
% MatLab's downsample.m function.
x = x(:).';
Lx = length(x);
y = zeros(1,N*Lx);

indices = 1:N:N*Lx;
y(indices) = x;

Contact us