4

Is there any matlab (default) function for Discrete Hartley Transform? And is it applicable for audio signal? I want to apply it instead of DWT or FFT.

emtiajium
  • 55
  • 5

2 Answers2

6

There is no in-build MATLAB function for DHT, but you can implement it very easily using the fft function:

function H=dht(x)
    X = fft(x);
    H = real(X) - imag(X);
end
jojeck
  • 11,107
  • 6
  • 38
  • 74
1

The links betwwen Fourier and Hartley are discussed in Hartley Transform vs Fourier Transform.

The quick FFT-based implementation can be found for instance in dht.m. I do not know of a native Matlab version. One reason could be that the Discrete Hartley transform is not so efficient in practice, as discussed in an answer to Hartley Transform vs Fourier Transform. Other references are in:

Laurent Duval
  • 31,850
  • 3
  • 33
  • 101