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 z = fastconv(x,y)
% Compute a linear (or circular, depending on relative signal lengths) convolution via DFT's.
% The only disadvantage of this method is that we have to know the exact
% size of both signals beforehand. Therefore, this method cannot be applied
% for on-line convolution computation.
% Both input sequences x and y should be of a common length and ideally this length should be L = 2^n.
% Therefore, necessary zero-padding arrangements must be arranged externally.
X = fft(x);
Y = fft(y);
Z = X.*Y;
z = ifft(Z);