# Differences

This shows you the differences between two versions of the page.

tutorial:the_discrete_fourier_transformation_dft [2012/11/29 01:34]
Simon-Shlomo Poil [Background]
tutorial:the_discrete_fourier_transformation_dft [2014/12/04 11:45] (current)
Line 11: Line 11:
- Learn to work with complex numbers and complex functions.   - Learn to work with complex numbers and complex functions.

+<note tip>You can run FFT analysis in the NBT toolbox ([[tutorial:download_and_install_nbt|]]) (using the Welch method).
+
+See
+
+[[tutorial:amplitude_in_classical_frequency_bands|]]
+
+or
+
+[[tutorial:power_spectra_wavelet_analysis_and_coherence|]]</note>

===== Background ===== ===== Background =====
Line 26: Line 35:
** Preparation for the tutorial ** ** Preparation for the tutorial **

-The commands on in this box ensure that the following exercise has all the necessary scripts and does not interfere with variables or graphics from previous exercises. If you come directly from another exercise it should be clear which commands you can skip.+The commands in this box ensure that the following exercise has all the necessary scripts and does not interfere with variables or graphics from previous exercises. If you come directly from another exercise it should be clear which commands you can skip.

Start MATLAB and find your current working directory using 'pwd'. Start MATLAB and find your current working directory using 'pwd'.
Line 98: Line 107:
phs = 90/360; % the phase of the wave.  phs = 90/360; % the phase of the wave.

- [wave] = SignalGenerator_sin(frq, len, Fs, phs); % Generate a sine wave.+ [wave] = signalgenerator_sin(frq, len, Fs, phs); % Generate a sine wave.
</code> </code>

Line 150: Line 159:
Note that in the summation over n = 0, 1, … N-1, the value of the basis function ($e_{k}[n]$) is computed ("sampled") at the same times 'n' as your recorded signal x[n] was sampled.  Note that in the summation over n = 0, 1, … N-1, the value of the basis function ($e_{k}[n]$) is computed ("sampled") at the same times 'n' as your recorded signal x[n] was sampled.

-Thus, the DFT formula basically states that the k’th frequency component is the sum of the element-by-element products of 'x' and 'e_k', which is the so-called inner product of the two vectors $x = [x(0), x(1), … x(N-1)]$ and $e_{k} = [e_{k}(0), e_{k}(1),… e_{k}(N-1)]$, i.e.,:+Thus, the DFT formula basically states that the k’th frequency component is the sum of the element-by-element products of 'x' and '$e_{k}$', which is the so-called inner product of the two vectors $x = [x(0), x(1), … x(N-1)]$ and $e_{k} = [e_{k}(0), e_{k}(1),… e_{k}(N-1)]$, i.e.,:

$X[k] = [x(0)*e_{k}(0) x(1)*e_{k}(1) ... x(N-1)*e_{k}(N-1)]$ $X[k] = [x(0)*e_{k}(0) x(1)*e_{k}(1) ... x(N-1)*e_{k}(N-1)]$
Line 277: Line 286:
<note>In the next section [[tutorial:fourier_transform_and_reconstruction_of_real_signals]], you will Fourier transform and reconstruct real broad-band neuronal data with oscillatory components.</note> <note>In the next section [[tutorial:fourier_transform_and_reconstruction_of_real_signals]], you will Fourier transform and reconstruct real broad-band neuronal data with oscillatory components.</note>

+<html>
+<!-- nbtwikibundbar -->