# Differences

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

Link to this comparison view

tutorial:plot_a_time-frequency_representation_and_power_spectrum_of_a_single_channel [2011/11/16 10:06]
Rick Jansen
tutorial:plot_a_time-frequency_representation_and_power_spectrum_of_a_single_channel [2014/04/07 23:56] (current)
Simon-Shlomo Poil
Line 3: Line 3:
A simple way to explore your signal is to plot the time-frequency representation (TF-plot) and power spectrum. The TF-plot will tell you how the power in different frequency bands changes over time, and the power spectrum shows you the time-averaged power.  A simple way to explore your signal is to plot the time-frequency representation (TF-plot) and power spectrum. The TF-plot will tell you how the power in different frequency bands changes over time, and the power spectrum shows you the time-averaged power.

-To plot a time-frequency representation and power spectrum in NBT you can use the function [[http://nbtoolbox.bzr.sourceforge.net/bzr/nbtoolbox/annotate/head%3A/Visualization/nbt_plot_TF_and_spectrum_one_channel.m|nbt_plot_TF_and_spectrum_one_channel.m]]. Open the GUI, load a signal (see [[Quick overview of the NBT GUI| The NBT GUI]]), and go to **Visualization|Plot time-frequency plot and power spectrum of one channel**. A dialog window will ask you to specify plot parameters. You can, e.g., set the 'print PDF' to 1, and a PDF file of the plot will be saved, or you can change the frequency range. You can also change these parameters directly from the plot. +To plot a time-frequency representation and power spectrum in NBT you can use [[http://nbtoolbox.hg.sourceforge.net/hgweb/nbtoolbox/NBTrelease/file/tip/Visualization/nbt_plot_TF_and_spectrum_one_channel.m|this function]]. Open the GUI, load a NBT signal, and go to **Visualization|Plot time-frequency plot and power spectrum of one channel**. A dialog window will ask you to specify plot parameters. You can, e.g., set the 'print PDF' to 1, and a PDF file of the plot will be saved, or you can change the frequency range. You can also change these parameters directly from the plot.

-Click 'OK' when you are done. The following interface will pop-up.+Click 'OK' when you are done. A window like this will pop-up:

{{:tutorial:tfspectrumplot.png|}} {{:tutorial:tfspectrumplot.png|}}
Line 13: Line 13:
In the left corner you see the power spectrum, in this case a clear 10 Hz peak is present.  In the left corner you see the power spectrum, in this case a clear 10 Hz peak is present.

-To compute amplitudes in several frequency bands, go to the next tutorial [[tutorial:amplitude_in_classical_frequency_bands|]]+To compute and store amplitudes in several frequency bands, go to the tutorial [[tutorial:amplitude_in_classical_frequency_bands|]].

==== Command line usage ==== ==== Command line usage ====
Line 45: Line 45:
</code> </code>
will plot channel number 1 with all the default settings for the other parameters.\\ will plot channel number 1 with all the default settings for the other parameters.\\
+
+<html>
+<!-- nbtwikibundbar -->
+     style="display:inline-block;width:728px;height:90px"
+<script>
+</script></html>

tutorial/plot_a_time-frequency_representation_and_power_spectrum_of_a_single_channel.1321437970.txt.gz · Last modified: 2011/11/16 10:06 by Rick Jansen
The NBTwiki platform - version 2.8 - 9 May 2013