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_DHT(x)
function X = my_DHT(x)
% This function calculates the Discrete Hartley Transform of a real
% sequence. In this function the time and frequency indices run from 0 to
% N-1. Therefore, when we use this function we consider strictly causal
% signals and only nonnegative frequencies.

% Take advantage of the fact that the input sequence x[n] is real:
X1 = fft(x);
% X1 = fftreal(x);
X = real(X1) - imag(X1);

Contact us