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 = my_IDFT(X)
% This function calculates the Inverse DFT of the input signal X.
% Input: X is a vector containing the DFT of x[n].
% Output: x is a row vector that contains the time domain signal .
% First create the conjugate twiddle factors matrix Wc:
% Make sure X is row vector for subsequent processing:
X = X(:).';
N = length(X);
x = zeros(size(X));
n = 0:N-1;
w = exp(1i*2*pi*n/N);
Wc = zeros(N,N);
Wc(:,k+1) = w.^k;
% Compute the IDFT as a product of the conjugate twiddle factors matrix with input vector x:
x = 1/N*X*Wc;