<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" style="word-wrap:break-word">
<div style="direction: ltr;font-family: Tahoma;color: #000000;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 <br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF163914"><font color="#000000" size="2" face="Tahoma"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of Caspar, Emilie [e.caspar@ucl.ac.uk]<br>
<b>Sent:</b> 12 June 2015 12:53<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Subject:</b> [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>
<div style="word-wrap:break-word">
<p class="MsoNormal"></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 style="color:#b245f3">
'biosemi64.lay'</span>;</div>
<div style="font-family:Courier; font-size:10px; margin:0px">cfg.channelcmb={<span style="color:#b245f3">'A13'</span>
<span style="color:#b245f3">'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></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>
</div>
</body>
</html>