<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Dear Amna,<div class=""><br class=""></div><div class="">First, I suggest you update your fieldtrip and EEGlab versions.</div><div class="">The line specified in your error does not match with the current eeglab2fieldtrip version (see here for the current implementation <a href="https://github.com/fieldtrip/fieldtrip/blob/master/external/eeglab/eeglab2fieldtrip.m" class="">https://github.com/fieldtrip/fieldtrip/blob/master/external/eeglab/eeglab2fieldtrip.m</a>)</div><div class=""><br class=""></div><div class="">Second, what are you trying to compare with ft_math? Without posting your cfg structure, it’s not possible to see where you might be having issues. I suggest double checking the documentation (<a href="https://github.com/fieldtrip/fieldtrip/blob/master/ft_math.m" class="">https://github.com/fieldtrip/fieldtrip/blob/master/ft_math.m</a>) to see how to call the function. The error you report could stem from either not specifying it at all (i.e. cfg.parameter is not in your cfg structure) or using one that is not present (i.e. using cfg.parameter = ‚avg‘, when ‚avg‘ is not in your data.</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class=""><br class=""></div><div class="">Julian<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 27.11.2019 um 08:36 schrieb Amna Hyder <<a href="mailto:hyder.amna@gmail.com" class="">hyder.amna@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Alternate possible solution!!<br class="">I thought I would add that the reason I am trying to import grand averaged ERPs from ERPlab is because I am running into some issues with the ft_timelockgrandaverage function when I use it on individual ERPs in fieldtrip. If I do cfg.keepindividual = 'yes' (which is required for cluster permutation analysis), the "avg" field is missing from the results. I only see the avg field if I specify "no" to keepindividual. I saw that someone had an issue with this in 2015 (<a href="https://mailman.science.ru.nl/pipermail/fieldtrip/2015-March/021876.html" class="">https://mailman.science.ru.nl/pipermail/fieldtrip/2015-March/021876.html</a>). I have tried to combine the grand average ERP by doing it once with keepindividual='yes' and once with keepindividual='no'. See below:<div class="">    [avgERP2]          =  ft_timelockgrandaverage(cfg);<br class="">    avgERP.individual = avgERP2.individual; %avgERP has only the "avg" field and is missing "individual". The opposite is true for avgERP2<br class="">    avgERP.dimord = avgERP2.dimord;<br class=""></div><div class=""><br class=""></div><div class="">All of this matters because when I try to apply ft.math on this data to compare conditions I get the following error:    'the requested parameter is not present in the data'. <br class="">It doesnt specify which field, so I am worried that there is some error in the way ft_timelockgrandaverage is working. <br class="">If you can help out with this issue, I wouldn't need to import already grand averaged ERP files from ERPlab.</div><div class="">Thanks so much for your prompt response.  </div><div class="">Amna</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 26, 2019 at 10:37 PM Julian Keil <<a href="mailto:julian.keil@gmail.com" class="">julian.keil@gmail.com</a>> wrote:<br class=""></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;" class="">Hi Amna,<div class=""><br class=""></div><div class="">is there a specific reason why you want to export the ERPs as ICA components?</div><div class="">eegla2fieldtrip has the option to use ’timelock’ as the second input option, which might be more sensible in your case.</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class=""><br class=""></div><div class="">Julian<br class=""><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">Am 27.11.2019 um 02:23 schrieb Amna Hyder <<a href="mailto:hyder.amna@gmail.com" target="_blank" class="">hyder.amna@gmail.com</a>>:</div><br class=""><div class=""><div dir="ltr" class="">Hi, <div class="">I did all my preprocessing in EEGlab and ERPlab and wanted to put in my ERP files into fieldtrip to do the cluster permutation analysis on my ERPs. I tried using the function eeglab2fieldtrip as specified in the following link: <a href="https://mailman.science.ru.nl/pipermail/fieldtrip/2006-March/000441.html" target="_blank" class="">https://mailman.science.ru.nl/pipermail/fieldtrip/2006-March/000441.html</a></div><div class="">I used the 'component analysis' option eg: <span style="white-space:pre-wrap" class="">comp = eeglab2fieldtrip(ERP, 'componentanalysis').</span></div>However, I get the following error: <div class="">Reference to non-existent field 'icachansind'.<br class="">Error in eeglab2fieldtrip (line 54)<br class=""> header.label   = { tmpchanlocs(EEG.icachansind).labels };</div><div class=""><br class=""></div><div class="">When I comment out these lines I run into another error:</div><div class="">Reference to non-existent field 'icaact'.<br class=""><br class="">Error in eeglab2fieldtrip (line 119)<br class="">        if isempty(EEG.icaact)<br class=""></div><div class=""><br class=""></div><div class="">It seems that this function requires ICA information in the EEGLAB ERP file, which isnt stored in the way that it is called. Can someone take a look into the function? Do I have to get the ERPs again in fieldtrip?</div><div class="">Amna</div></div>
_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class=""><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class=""></div></blockquote></div><br class=""></div></div></div>_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</blockquote></div>
_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">https://doi.org/10.1371/journal.pcbi.1002202<br class=""></div></blockquote></div><br class=""></div></body></html>