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_downsample(x,M)
function y = my_downsample(x,M)
% This function performs downsampling to input row vector x
% by a factor of M. It is written in such a way as to agree with
% MatLab's downsample.m function.
x = x(:).';
Lx = length(x);
y = zeros(1,ceil(Lx/M));

indices = 1:M:Lx;
y = x(indices);

Contact us