<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base href="x-msg://16/">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div apple-content-edited="true">
<div>Dear Nietzsche, </div>
<div><br>
</div>
<div>Sorry for the missing letter! Indeed, it slightly changes the meaning x)</div>
<div><br>
</div>
<div>I have tried with different electrodes for avg Left and Right </div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 10px; font-family: Courier; ">
<div style="margin: 0px; ">cfgL             = [];</div>
<div style="margin: 0px; ">cfgL.channel = {<span style="color: #b245f3">'A*'</span>}</div>
<div style="margin: 0px; ">avgL = ft_timelockanalysis(cfgL, clean_data);</div>
<div style="margin: 0px; ">cfgR             = [];</div>
<div style="margin: 0px; ">cfgR.channel = {<span style="color: #b245f3">'B*'</span>}</div>
<div style="margin: 0px; ">avgR = ft_timelockanalysis(cfgR, clean_data);</div>
<div><br>
</div>
</div>
<div style="margin: 0px; font-size: 12px; font-family: Courier; min-height: 14px; ">
<br>
</div>
</div>
And then I have asked for ft_lateralizedpotential: </div>
<div apple-content-edited="true"><br>
</div>
<div apple-content-edited="true">
<div style="margin: 0px; font-size: 10px; font-family: Courier; ">
<div style="margin: 0px; ">cfgT             = [];</div>
<div style="margin: 0px; ">cfgT.channelcmb={<span style="color: #b245f3">'A13'</span>
<span style="color: #b245f3">'B18'</span>};</div>
<div style="margin: 0px; ">lrp=ft_lateralizedpotential(cfgT,avgL,avgR);</div>
<div style="margin: 0px; ">cfgT             = [];</div>
<div style="margin: 0px; ">cfgT.xlim = [-2 1];</div>
<div style="margin: 0px; ">cfgT.ylim = [-12 10];</div>
<div style="margin: 0px; ">clf;</div>
<div style="margin: 0px; ">ft_singleplotER(cfgT, lrp)</div>
<div style="margin: 0px; font-size: 12px; min-height: 14px; "><br>
</div>
</div>
<div>I agree that avgL and avgR are more logical now. However, the plot is still not working, with the following error:</div>
<div>
<div><br>
</div>
<div><font color="#b51a00">Error using fixdimord (line 85)</font></div>
<div><font color="#b51a00">the data does not contain a dimord, but it also does not resemble raw or component data</font></div>
</div>
<div><br>
</div>
<div>I still do not really understand what is wrong. My script/data work very well without the ft_lateralized. I have already looked at the results for the readiness potential. I just want to look now for the lateralized RP.</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>Emilie</div>
<div><br>
</div>
</div>
<br>
<div>
<div>On 12 juin 2015, at 13:07, "Lam, N.H.L. (Nietzsche)" <<a href="mailto:n.lam@donders.ru.nl">n.lam@donders.ru.nl</a>></div>
<div> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div ocsi="0" fpstyle="1" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; ">
<div style="direction: ltr; font-family: Tahoma; font-size: 10pt; ">Hi Emilie,<br>
<br>
We won't be ripping any fields anytime  ("Fieldrippers")  ;)<br>
<br>
(1) Assuming your data has been calculated correctly, then the issue is the input argument you gave to ft_singleplotER<br>
<br>
You should probably try:  <ft_singleplotER(cfg,lrp)  % giving ft_singleplotER only the 'plotlabel' field is incorrect because the function expects a struct (i.e. the structure of timelock of freqdata).<br>
<br>
(2) Your second question is a bit vague, but logically speaking you will not find a difference between avgL and avgR if both are computed from the same dataset.  1-1 = 0, no difference.<br>
Not sure what your pipeline looks like, but I suspect that you need timelocked data for only the left sensors in one data set (Lavg), and timelocked data for only the right sensors in a separate dataset (Ravg).<br>
<br>
Good luck,<br>
Nietzsche<span class="Apple-converted-space"> </span><br>
<br>
<div style="font-family: 'Times New Roman'; font-size: 16px; ">
<hr tabindex="-1">
<div id="divRpF163914" style="direction: ltr; "><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>]
 on behalf of Caspar, Emilie [<a href="mailto:e.caspar@ucl.ac.uk">e.caspar@ucl.ac.uk</a>]<br>
<b>Sent:</b><span class="Apple-converted-space"> </span>12 June 2015 12:53<br>
<b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br>
<b>Subject:</b><span class="Apple-converted-space"> </span>[FieldTrip] ft_lateralizedpotential question<br>
</font><br>
</div>
<div></div>
<div>Dear Fieldrippers, 
<div><br>
</div>
<div>I have a small question about ft_lateralizedpotential.</div>
<div>I am currently trying to compute a LRP. Thus, I wrote: <br>
<div>
<div style="word-wrap: break-word; ">
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px; "></p>
<div style="margin: 0px; font-size: 10px; font-family: Courier; ">avgL = ft_timelockanalysis(cfg, cleandata);</div>
<div style="margin: 0px; font-size: 10px; font-family: Courier; ">avgR = ft_timelockanalysis(cfg, cleandata);</div>
<div style="margin: 0px; min-height: 14px; ">
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">cfg             = [];</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">cfg.layout      =<span class="Apple-converted-space"> </span><span style="color: rgb(178, 69, 243); ">'biosemi64.lay'</span>;</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">cfg.channelcmb={<span style="color: rgb(178, 69, 243); ">'A13'</span><span class="Apple-converted-space"> </span><span style="color: rgb(178, 69, 243); ">'B18'</span>};</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">lrp=ft_lateralizedpotential(cfg,avgL,avgR);</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">cfg             = [];</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">cfg.xlim = [-2 1];</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">cfg.ylim = [-12 10];</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">clf;</div>
<div style="font-family: Courier; font-size: 10px; margin: 0px; ">ft_singleplotER(cfg, lrp.plotlabel)</div>
<div style="font-family: Courier; font-size: 12px; "><br>
</div>
<div>There is apparently something wrong with the plot because I get the following error message: </div>
</div>
<p style="margin-top: 0px; margin-bottom: 0px; "></p>
<div>
<div>Error using ft_checkdata (line 461)</div>
<div>This function requires timelock or freq data as input.</div>
</div>
<div><br>
</div>
<div>I have also tried to add a new <span style="font-family: Courier; font-size: 10px; ">avgLRP = ft_timelockanalysis(cfg, lrp);</span></div>
<div style="margin: 0px; font-size: 12px; min-height: 14px; ">and then to compute the plot based on that, but it is not working. If anyone has an idea!</div>
<div><br>
</div>
<div>Second question:, ft_lateralizedpotential only works (apparently) with two outputs (avgL and R, for instance). Thus, I computed the same ft_timelockanalysis with two different names, but I am not sure this is correct. Is someone able to answer?</div>
<div><br>
</div>
<div><br>
</div>
<div>Thank you in advance for your help!</div>
<div><br>
</div>
<div>Emilie</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br>
</body>
</html>