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.

fft241(x,y)
function [X Y] = fft241(x,y)
% This function calculates the DFT's of two real N-point sequences, by means of
% a single N-point complex DFT evaluation.

% Make sure x and y are row vectors.
x = x(:).';
y = y(:).';

z = x + 1i*y;  % Form the complex sequence z[n].
Z = fft(z);
 
X =        1/2*(Z + conj(circshift(fliplr(Z),[0 1])));  % even sequence
Y = 1/(2*1i)*(Z -  conj(circshift(fliplr(Z),[0 1])));  % odd sequence

Contact us