Can someone explain to me what each element of the 1D FFT algorithm are (i.e. N,x,n,j,k) ? From here, http://zone.ni.com/reference/en-XX/help/371361H-01/lvanls/fft/#details

(Can't post pictures on stackoverflow just yet.... but its the 1D FFT description)

  • 5
    $\begingroup$ Yes, it is very hard these days, where there is only one source of information on the internet. $\endgroup$
    – M529
    Mar 17, 2016 at 22:18
  • $\begingroup$ When you can't seem to find a clear definition for each of the elements in the algorithm, yes it is. So unless your going to be helpful don't bother commenting, thanks. $\endgroup$
    – shorty
    Mar 17, 2016 at 22:27
  • 3
    $\begingroup$ @shorty All those variables are defined in the link you posted (except $j$, which is equal to $\sqrt{-1}$; also, $x_k$ means $x[k]$.). Please be more specific in what your current understanding is and what you need help with. Otherwise, an answer here will just repeat what is posted on your link, and that wouldn't help you much. $\endgroup$
    – MBaz
    Mar 17, 2016 at 23:04
  • $\begingroup$ I have an array of integer values(positive and negative), which i want to pass through an FFT but i don't know how this will work as i though fft were only for complex numbers? thank you $\endgroup$
    – shorty
    Mar 17, 2016 at 23:07

1 Answer 1


Consider a MATLAB/OCTAVE implementation of 1D-DFT/FFT sum: $$X[k] = \sum_{n=0}^{N-1} {x[n]e^{-j \frac {2\pi}{N} k n} } $$ where $n=0,...,N-1$ and $k=0,...,N-1$

Those identifiers are used to denote the following:

$N$: is the FFT length as in $N$-point FFT.

$x[n]$: is the discrete-time signal whose DFT $X[k]$ is to be computed.

$X[k]$: is the complex-valued DFT of the signal $x[n]$

$n$: is the discrete-time index for the signal $x[n]$ in the range $n=0,...,N-1$.

$k$: is the frequency sample index of $X[k]$, in the range $k=0,...,N-1$.

$j$: is the imaginary unit $\sqrt {-1}$ in signal processing terminology.

Note if the signal $x[n]$'s length is shorter than the FFT length, then zero padding is applied on $x[n]$ to make its length $N$. Otherwise if it's longer than $N$, then the samples after $N-1$ are ignored according to MATLAB/OCTAVE implementation.

  • $\begingroup$ so is x[n], and array of input values? as mine are currently just a collection of positive and negative numbers $\endgroup$
    – shorty
    Mar 17, 2016 at 23:18
  • $\begingroup$ yes x[n] is your time domain input buffer of N samples (mostly real valued but it can be complex as well) and X[k] is the DFT (the frequency domain signal) which is complex valued in general. $\endgroup$
    – Fat32
    Mar 17, 2016 at 23:21
  • $\begingroup$ ah, so X[k] is the "processed" values which, if i plot, should give me my FFT graph? $\endgroup$
    – shorty
    Mar 17, 2016 at 23:23
  • $\begingroup$ yes indeed ! But don't forget to take the absolute value of X[k] to plot the FFT "magnitude-spectrum", as it is complex valued. You can then also plot the phase spectrum as well. $\endgroup$
    – Fat32
    Mar 17, 2016 at 23:26
  • $\begingroup$ Oh brilliant! Thank you very much. oh what is a phase spectrum ? $\endgroup$
    – shorty
    Mar 17, 2016 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.