Differences

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

Link to this comparison view

tutorial:the_discrete_fourier_transformation_dft [2012/11/29 01:32]
Simon-Shlomo Poil [Background]
tutorial:the_discrete_fourier_transformation_dft [2014/12/04 11:45] (current)
Klaus Linkenkaer-Hansen [Background]
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)]$
  
-Because $e_{k}$ is a unit-length vector, the inner product of x and $e_{k}$ may be seen (somewhat abstractly…) as a **"projection of the data x onto the complex basis function $e_{k}$"**.+Because $e_{k}$ is a unit-length vector, the inner product of x and $e_{k}$ may be seen (somewhat abstractly…) as a **"projection of the data x onto the complex basis function** $e_{k}$ **"**.
  
 In order to directly apply the DFT formula to our 'x', we therefore compute the basis vectors ('$e_{k}$') corresponding to the value of the basis functions at times 'n' and our value of 'N' (use the "arrow-up key" to speed up typing): In order to directly apply the DFT formula to our 'x', we therefore compute the basis vectors ('$e_{k}$') corresponding to the value of the basis functions at times 'n' and our value of 'N' (use the "arrow-up key" to speed up typing):
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>
 +<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
 +<!-- nbtwikibundbar -->
 +<ins class="adsbygoogle"
 +     style="display:inline-block;width:728px;height:90px"
 +     data-ad-client="ca-pub-8640848843881724"
 +     data-ad-slot="2215324537"></ins>
 +<script>
 +(adsbygoogle = window.adsbygoogle || []).push({});
 +</script>
 +</html>
  
  
tutorial/the_discrete_fourier_transformation_dft.1354152748.txt.gz · Last modified: 2012/11/29 01:32 by Simon-Shlomo Poil
The NBTwiki platform - version 2.8 - 9 May 2013
Copyright (C) 2008-2015