0
$\begingroup$

I'm trying to understand a paper describing an algorithm for doing autocorrelation of audio signals (so I can implement the algorithm in my C program), and this part of the description confuses me:

enter image description here

As I understand it, xlow and xhigh each represent a finite sequence of (e.g. 1024) audio samples; and DFT is the Discrete Fourier Transform function that I pass the samples into, in order to get back equal-sized sequences of (e.g. 1024) Complex values representing the audio's frequencies-distribution. So far, so good.

The next step, then (as indicated by the vertical bars, if I remember my math notation correctly) is to compute the magnitude/absolute-value of the DFT's. But it's not clear to me what magnitude/absolute-value means in the context of a DFT result. Can someone explain this operation to me (keeping in mind that my mathematical skills are quite rudimentary)?

(Googling only brought me to a bunch of MatLab scripts which invoke the abs() function on a DFT result, but don't describe what the operation does :( )

$\endgroup$
  • $\begingroup$ $|a+ib|^2 = a^2+b^2, |a+ib| = \sqrt{a^2+b^2}$ $\endgroup$ – reuns Nov 16 '17 at 0:25
  • $\begingroup$ @reuns I'm probably missing something obvious, but your equation appears to compute the (scalar) magnitude of a single Complex value; in this case I need to compute the magnitude of a sequence-of-1024-Complex-values, and AFAICT the result of that computation needs to be a sequence-of-1024-Complex-values as well, since a sequence of Complex values is what the IDFT() (inverse DFT) function expects as its input. $\endgroup$ – Jeremy Friesner Nov 16 '17 at 0:44
  • $\begingroup$ Apply $|.|$ to each complex number.. In matlab $|.|$ is abs and it works also for arrays. $\endgroup$ – reuns Nov 16 '17 at 0:46
  • $\begingroup$ @reuns so just to make sure I understand correctly, I'd set the "real" portion of each Complex number to the value specified by your formula, and the "imaginary" portion of each Complex number to zero? $\endgroup$ – Jeremy Friesner Nov 16 '17 at 0:49
  • 1
    $\begingroup$ sure $\sqrt{a^2+b^2}$ is a complex number with zero imaginary part $\endgroup$ – reuns Nov 16 '17 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.