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_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);