<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma",sans-serif;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1933472298;
        mso-list-type:hybrid;
        mso-list-template-ids:516348136 67567631 67567641 67567643 67567631 67567641 67567643 67567631 67567641 67567643;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Iris,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I assume that you want to compare if spectra are different between these conditions. In that case, I would advise you
 to take a look at the Fieldtrip TFR-statistics tutorial, <a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq">
http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq</a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">. it explains how you can use cluster-based permutation to look for
 differences between spectra, within or between subjects. In your case, instead of comparing a baseline with an activation epoch (as described in the tutorial), you compare your (baseline-corrected) conditions A and B.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">Stan</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> fieldtrip-bounces@science.ru.nl [mailto:fieldtrip-bounces@science.ru.nl]
<b>On Behalf Of </b>Steinmann, Iris<br>
<b>Sent:</b> maandag 21 november 2016 13:18<br>
<b>To:</b> FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Subject:</b> Re: [FieldTrip] Questions about time frequency analysis of EEG data<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Stan,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">thanks for your answer. Since I’m working on a similar problem it also helped me a lot.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Would be great if you can answer me two more questions about subtracting time-frequency spectra:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><![if !supportLists]><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Before subtracting two spectra, I baseline corrected them (ft_frequbaseline, ‘relchange’) (to circumvent the problem Arti described below)<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_bc = [];</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_bc.baseline = [-2 -1.8];</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_bc.baselinetype =
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#A020F0">'relchange'</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">;</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_bc.parameter =
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#A020F0">'powspctrm'</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">;       
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">A_bc = ft_freqbaseline(cfg_bc, A);<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">B_bc = ft_freqbaseline(cfg_bc, B);</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">       
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_m = [];</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_m.operation =
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#A020F0">'subtract'</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">;</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">cfg_m.parameter =
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#A020F0">'powspctrm'</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">;</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">AB_diff = ft_math(cfg_m,  A_bc, B_bc);<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Is there anything wrong doing it like this (except I’m not able to change the baseline conditions afterwards…)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2;text-autospace:none">
<![if !supportLists]><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Is it really viable to perform a linear operation (subtraction) on squared data (spectra). I mean, a lot of people are doing, so it should
 be somehow reliable…but I’m still wondering…</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks in advance!<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Iris<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif">
<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl">mailto:fieldtrip-bounces@science.ru.nl</a>]
<b>On Behalf Of </b>Pelt, S. van (Stan)<br>
<b>Sent:</b> Mittwoch, 16. November 2016 08:58<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Questions about time frequency analysis of EEG data<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Dear Arti,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">My guess is that is has to do with plotting relative change instead of e.g. absolute change. In the individual conditions,
 you plot relative change to their own baselines, which is in the order of 0.2 or so.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Now when you subtract the 2 conditions, the difference in both baseline and activation epoch is probably small. So when
 you plot the tfr of this, normalized by the baseline wpoch values of this difference signal, it might blow up the relative change values. You might want to plot just the absolute values of the difference TFR, since it is the difference in the activation window
 that is most relevant to you (assuming that baseline values are not different between the conditions. Or you could contrast just the activation epochs (e.g., using the tfr of cond1 as ‘baseline’ for cond2), and plot relative change of that.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’ll illustrate it with some example values to show what I think goes ‘wrong’:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Cond. 1: baseline: 4; activation 6; -> rel.change 0.5 (50% increase)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Cond. 2: baseline 3.9; acitivation 6.3; -> rel change 0.6 (60% increase)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Difference: baseline 0.1; activation 0.3 -> rel change 2.0 (200% increase)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Stan<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">--<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Stan van Pelt, PhD<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Donders Institute for Brain, Cognition and Behaviour<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Radboud University<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Montessorilaan 3, B.01.34<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">6525 HR Nijmegen, the Netherlands<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">tel: +31 24 3616288<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl">mailto:fieldtrip-bounces@science.ru.nl</a>]
<b>On Behalf Of </b>Arti Abhishek<br>
<b>Sent:</b> woensdag 16 november 2016 5:09<br>
<b>To:</b> FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
<b>Subject:</b> [FieldTrip] Questions about time frequency analysis of EEG data<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear fieldtrip community,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I am running time frequency analysis on my EEG data and when I subtract the response between conditions, the difference condition has much higher amplitude. Could someone suggest what is wrong here?
<br>
<br>
Please find the image here:<br>
<a href="https://www.dropbox.com/s/kh5uzz8000fmh1b/tfr.pdf?dl=0">https://www.dropbox.com/s/kh5uzz8000fmh1b/tfr.pdf?dl=0</a><o:p></o:p></p>
</div>
<p class="MsoNormal">and here is my script<br>
<br>
cfg                      = [];<br>
cfg.trials              = find(s01_ica_clean_artrel_reref.trialinfo==102);<br>
cfg.channel          = 'EEG';                    <br>
cfg.method           = 'wavelet';                <br>
cfg.width              = 7; <br>
cfg.output             = 'pow';    <br>
cfg.foi                  = 2:2:40;                    <br>
cfg.toi                  = -0.4:0.02:0.5;                      <br>
s01_cond1           = ft_freqanalysis(cfg, s01_cond1_preprocess);<o:p></o:p></p>
</div>
<p class="MsoNormal">% difference<o:p></o:p></p>
<div>
<p class="MsoNormal">cfg=[];<br>
cfg.parameter='powspctrm';<br>
cfg.operation ='x1-x2';<br>
s01_difference     =ft_math(cfg, s01_cond1, s01_cond2);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">% plot<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">cfg                     = [];<br>
cfg.baseline=[-0.4 -0.1];<br>
cfg.zlim=[-0.5 0.5];<br>
cfg.xlim=[-0.4 0.5];<br>
cfg.baselinetype = 'relchange';<br>
cfg.layout              = lay;<br>
cfg.interactive         = 'yes';<br>
cfg.channel={'FZ'};<br>
subplot (1,3,1)<br>
ft_singleplotTFR(cfg, s01_cond1);<br>
title('deviant');<br>
subplot (1,3,2);<br>
ft_singleplotTFR(cfg, s01_cond2);<br>
title('standard');<br>
subplot (1,3,3)<br>
ft_singleplotTFR(cfg, s01_difference);<br>
title('difference');<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Arti<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>