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_DHT3(x)
function X = my_DHT3(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.
N = length(x);
X = zeros(1,N);

for k=0:N-1
    for n=0:N-1
        X(k+1) = X(k+1) + x(n+1)*(cos(2*pi*n*k/N) + sin(2*pi*n*k/N));
    end
end

Contact us