<div dir="ltr"><div><div><div><div>Hi Jan-Mathijs, <br></div><div><br></div><div>thank you for your answer, I do my best to explain your questions. <br>The Problem is, that I don't have datastructures that I can combine (but I would like to have them). So that's the primary question. <br></div><br></div><div>These are the steps I already did: <br>I measured, as mentioned before, with an EEG the visual stimulation via two frequencies (SSVEP). <br></div>I preprocessed my data with ft_preprocessing (cuttet it in segments, did filtering, concenated the cfg-Matrix with the trialinfo of my clean preprocessed data and then, with a loop, I made the SSVEP-analysis for all my subjects (ft_timelockanalysis and ft_frequencyanalysis). <br></div>I made the timelockanalysis for the two frequencies separately and for the control-target (which in this case is something like a baseline-condition for measuring the average activation of the subject-brains, so I can differ the target-activation from it. Now  I added the Grand Mean:<br></div><div><br></div><div>gm_1 = ft_timelockgrandaverage(cfggm, tl1); gm_2 = ft_timelockgrandaverage(cfggm, tl2);)</div><div><br></div><div>separately for the two frequencies. <br></div><div>I am now failing when trying to make the grand mean for the difference and the sum of the two frequencies. I tried to make something like this for the sum: <u><br></u></div><div><br></div><div>gm_3 =ft_timelockgrandaverage(cfggm, tl1, tl2) <br></div><div><br></div><div>but I don't think it's correct. <br></div><div>So I tried to make the difference like that: <br></div><div><br></div><div>cfg = [];<br>cfg.parameter = 'avg';<br>cfg.operation = 'x1-x2';<br>difftopo12 = ft_math(cfg, gm_1, gm_2);</div><div>figure <br>cfg=[];<br>cfg.xlim = [0.1:0.05:0.5];<br>cfg.zlim = [-2 2];<br>cfg.layout = '63equidistant_lay.mat';<br>ft_topoplotER(cfg, difftopo12);</div><div><br></div><div>But for this procedure I need datastructures for x1 and x2, which I don't have. <br>(Fieldtrip:<code></code><code> In the specification of the mathematical operation, x1 is the parameter obtained
</code><pre class="gmail-highlight"><code>from the first input data structure, x2 from the second, etc.)</code></pre>

So I have a way that would work but not the datastructures. <br></div><div><br></div><div>I tried to make the datastructures like this: <br></div><div><br></div><div>tl1{vpn} = ft_timelockanalysis(cfg,data)       (vpn is the name I gave the subjects when looping them for the timelock- and frequencyanalysis. --> for for vpn = 1:length(cleannames)...)<br></div><div><br></div><div>and then to make the grand mean like this: <br></div><div><br></div><div>gm_1 = ft_timelockgrandaverage(cfg, tl1{:});</div><div><br></div><div>but it doesn't work. <br></div><div><br></div><div><br></div><div>I would be really thankfull if you yould give me some help to find the error, <br></div><div><br></div><div>Sarah<br><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 14. Mai 2020 um 19:12 Uhr schrieb Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
<font size="4">Dear Sarah,</font>
<div><font size="4"><br>
</font></div>
<div><font size="4">Thanks for clarifying your question. Now, could you provide the readership with some additional information about how you constructed these data structures, and how you tried to combine them, otherwise we (i.e. the people
 who’d want to think along with you to fix your problem) don’t know where to start.</font></div>
<div><font size="4"><br>
</font></div>
<div><font size="4">Jan-Mathijs</font></div>
<div><font size="4"><br>
</font>
<div><br>
<blockquote type="cite">
<div>On 14 May 2020, at 09:32, Sarah Kirchler <<a href="mailto:sarah.kirchler@gmail.com" target="_blank">sarah.kirchler@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Dear Jan-Mathijs,</div>
<div><br>
</div>
<div>thank you for your answer. I see, i expressed myself not very clear.
<br>
</div>
<div>I'd like to make the Grand mean for the difference and the sum between two specific frequencies I measured visually wih a SSVEP.
<br>
</div>
<div>I'd like to do this because I'm interested in how the frequencies are processed in the brain regarding each other and a control measurement.<br>
</div>
<div>I'm not sure if I can make the difference already when I make the GM or later, when I plot the topography.
<br>
</div>
<div>I tried to make this by building a datastructure that contains the GM of the one and the other frequency and then usw ft_math to compare them. But this doesn't work for me.
<br>
</div>
<div>Maybe thats enough information for you to understand the problem better, I'm a beginner so I often explain my problems a little bit confusing, sorry for that.
<br>
<br>
</div>
<div>Best, <br>
<br>
</div>
<div>Sarah<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Mi., 13. Mai 2020 um 15:30 Uhr schrieb Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><font size="4">Dear Sarah,</font>
<div><font size="4"><br>
</font></div>
<div><font size="4">It is not clear what error message you get, nor why you think you should ft_timelockanalysis/ft_timelockgrandaverage/ft_topoplotER.</font></div>
<div><font size="4"><br>
</font></div>
<div><font size="4">Some pointers: </font></div>
<div><font size="4">-For a mathematical operation to be applied to numeric data that resides within a fieldtrip-style data structure you’d use ft_math.</font></div>
<div><font size="4">-What you want to do (i.e. adding or subtracting estimates of frequency specific power estimated for different frequency bins) probably requires some manual intervention with the data, because FT will likely prevent
 you to do so, since it checks whether the frequency bins for the to-be-combined data structures match. I could type some recipe now, but since you are not too clear on the details so I’d rather not spend time on that now. Also, I’d like to give other people
 the opportunity to chime in here :).</font></div>
<div><font size="4"><br>
</font></div>
<div><font size="4">Best wishes,</font></div>
<div><font size="4">Jan-Mathijs</font></div>
<div><br>
<blockquote type="cite">
<div>On 11 May 2020, at 16:43, <a href="mailto:sarah.kirchler@gmail.com" target="_blank">
sarah.kirchler@gmail.com</a> wrote:</div>
<br>
<div>
<div style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
Dear Fieldtrip Users,<span> </span><br>
<br>
thank you for all the help you’ve given me already.<span> </span><br>
Now I am trying to make the sum and the difference of the Grand mean from/between two frequencies I measured with an EEG.<span> </span><br>
I read that it is possible to make a datastructure using {} within ft_timelockbaseline and then use the option cfg.operation(x1-x2 and so on) as a operation of function ft_topoplotER to make this sum/these differences.<span> </span><br>
Now my Problem is that I don’t need to make the baselinecorrection via ft_timelockbaseline because I don’t have the baseline in the datasegment I’m interested in. So I tried to build the datastructure for cfg.operation within ft_timelockanalysis but Fieldtrip
 doesn’t allow this and I get an error message.<span> </span><br>
<br>
</div>
<div style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
My questions are now:<span> </span><br>
1. Can I make the difference also within the ft_timelockgrandavverage function or do I have to make the difference lawer in ft_topoplotER?<span> </span><br>
2. If so, how can I or form a datastructure I can use in cfg.operation or make the difference differently with some other function?<br>
<br>
</div>
<div style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
I hope you understand me,<span> </span><br>
to all you extraordinary brains: thank you in advance,<span> </span><br>
<br>
Sarah</div>
<div style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<u></u> <u></u></div>
</div>
<span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">_______________________________________________</span><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">fieldtrip
 mailing list</span><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>