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 x = method3_idft(X)
%% b. Create a macro to compute the IDFT of a sequence using method III.
% Make sure X is a row vector.
X = X(:).';
N = length(X);
x = zeros(1,N);
% Calculate the inverse DFT by computing the DFT of X[k] ...
... and divide the result by 1/N
x1 = 1/N*fft(X);
... and reverse the order of the result.
x = circshift(fliplr(x1),[0 1]);