<div dir="ltr"><div>Dear Jörn,<div><br></div><div>Pardon my ignorance, however, I'm not exactly sure what you mean as I'm not an expert in matlab programming. I've checked the functions, but I still don't understand how I could resolve my issue.</div>
<div><br></div>In addition, I checked on Easycap website, and find that the Montage 11 (or what the template directory called 'easycapM11.mat') is the closest fit to the cap that I used for the EEG recordings (At least that's what I gathered from their website).<br>
<br></div>Could you please alternatively show me how you would do for repairing bad channels for the EEG data (an example)?<br><div><div><div><br></div><div>Thank you.<br><br></div><div>Cheers,<br>Hweeling<br><br></div></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 August 2014 14:10, "Jörn M. Horschig" <span dir="ltr"><<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hweeling,<br>
<br>
reading the help of the function might help ;)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The EEG or MEG sensor positions can be present in the data or can be specified as<br>
cfg.elec = structure with electrode positions, seeFT_DATATYPE_SENS <<a href="http://fieldtrip.fcdonders.nl/reference/ft_datatype_sens" target="_blank">http://fieldtrip.fcdonders.<u></u>nl/reference/ft_datatype_sens</a>><br>
cfg.grad = structure with gradiometer definition, seeFT_DATATYPE_SENS <<a href="http://fieldtrip.fcdonders.nl/reference/ft_datatype_sens" target="_blank">http://fieldtrip.fcdonders.<u></u>nl/reference/ft_datatype_sens</a>><br>
cfg.elecfile = name of file containing the electrode positions, seeFT_READ_SENS <<a href="http://fieldtrip.fcdonders.nl/reference/ft_read_sens" target="_blank">http://fieldtrip.fcdonders.<u></u>nl/reference/ft_read_sens</a>><br>
cfg.gradfile = name of file containing the gradiometer definition, seeFT_READ_SENS <<a href="http://fieldtrip.fcdonders.nl/reference/ft_read_sens" target="_blank">http://fieldtrip.fcdonders.<u></u>nl/reference/ft_read_sens</a>><br>
</blockquote>
<br>
The cross-reference to ft_datatype_sens should help you to resolve your issue (and check out the FieldTrip/template directory)<br>
<br>
Best,<br>
Jörn<div><div class="h5"><br>
<br>
<br>
On 8/5/2014 1:53 PM, Hwee Ling Lee wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Dear all,<br>
<br>
I'm trying to repair the bad channels by using the ft_channelrepair function for 64 channels EEG data.<br>
<br>
I've set up the structure like this:<br>
<br>
<br>
load('/home/leeh/Programs/<u></u>fieldtrip-20140803/template/<u></u>layout/easycapM11.mat');<br>
<br>
cfg_neighb.method = 'distance';<br>
cfg_neighb.layout = lay;<br>
neighbours = ft_prepare_neighbours(cfg_<u></u>neighb, data4);<br>
<br>
cfg = [];<br>
if strcmp('S004', dir_analysis{sub}) == 1<br>
cfg.badchannel = {'C4', 'TP9', 'FC4', 'C2', 'F4'};<br>
end<br>
cfg.trials = 'all';<br>
cfg.method = 'average';<br>
cfg.neighbours = neighbours;<br>
cfg.elec = lay.pos;<br>
data5 = ft_channelrepair(cfg, data4);<br>
<br>
However, I get an error message:<br>
<br>
ttempt to reference field of non-structure array.<br>
Error in ft_datatype_sens (line 136)<br>
nchan = length(sens.label);<br>
Error in ft_checkconfig (line 246)<br>
cfg.elec = ft_datatype_sens(cfg.elec);<br>
Error in ft_preamble_trackconfig (line 38)<br>
cfg = ft_checkconfig(cfg, 'trackconfig', 'on');<br>
Error in ft_preamble (line 54)<br>
evalin('caller', ['ft_preamble_' cmd]);<br>
Error in ft_channelrepair (line 76)<br>
ft_preamble trackconfig<br>
<br>
Can someone please help me?<br>
<br>
Thank you very much!<br>
<br>
Best regards,<br>
Hweeling<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/<u></u>mailman/listinfo/fieldtrip</a><br>
</blockquote>
<br>
<br>
-- <br>
Jörn M. Horschig<br>
PhD Student<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen<br>
Neuronal Oscillations Group<br>
FieldTrip Development Team<br>
<br>
P.O. Box 9101<br>
NL-6500 HB Nijmegen<br>
The Netherlands<br>
<br>
Contact:<br>
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a><br>
Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a><br>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a><br>
<br>
Visiting address:<br>
Trigon, room 2.30<br>
Kapittelweg 29<br>
NL-6525 EN Nijmegen<br>
The Netherlands<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">=================================================<br>Dr. rer. nat. Lee, Hwee Ling<br>Postdoc<br>German Center for Neurodegenerative Diseases (DZNE) Bonn<br>
<br>Email 1: hwee-ling.lee<at><a href="http://dzne.de" target="_blank">dzne.de</a><br>Email 2: hweeling.lee<at><a href="http://gmail.com" target="_blank">gmail.com</a><div><br></div><div><a href="https://sites.google.com/site/hweelinglee/home" target="_blank">https://sites.google.com/site/hweelinglee/home</a><br>
<br>Correspondence Address:<br>Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany<br>=================================================<br></div></div>
</div>