<div dir="ltr"><div class="gmail_default" style="color:rgb(51,51,153)">Hello Frederica, a few quick notes below. Best wishes.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">***********BEGIN NOTES FOR FREDERICA</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">As Fieldtrip to eeglab cross-functionality is important, please do share more about your experiences and solutions when you can, so that other users on the list can benefit.<br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">To keep things simple, one can first try to just export the data in the simplest manner possible from Fieldtrip, and then use a normal import function in eeglab (such as biosig, or file I/O, essentially just trying to load simple matlab or text files). If you are trying to export a complex Fieldtrip dataset, you may be creating unecessary issue. If you are not already, shoot for just single-subject channels X time matrices.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Also, if you haven not had a chance to yet, first try some very simple export from fieldtrip to eeglab, and vice versa, and see if you can get that to work in a sane manner. Use a simple eeglab dataset and get it into fieldtrip cleanly. then vice versa. <br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">You basically want the structure of the data (channels X time) that is exported from Fieldtrip (e.g., as text or mat files) to be as close to what eeglab wants/expects. I recommend practicing the export and import paths several different ways and going from there. </div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">The fieldtrip2eeglab and eeglab2fieldtrip functions should work well enough, but they may not be supported or fully updated to deal with all kinds of cases. If you find that this is a replicable bug/problem then please make a note about the issue on the eeglab bugzilla.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">If you are matlab saavy, you want to examine  very closely the structure of fireldtrip data and of eeglab data, and then look closely within the fieldtrip2eeglab function. You would want to step through closely each step that the functions take, and review closely what kind of data they are looking for.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Also, you may want to check in with Max Cantor, or other people who have posted to the eeglablist, that have used both fieldtrip and eeglab.</div><div class="gmail_default" style="color:rgb(51,51,153)">If you haven't had a chance to yet, make sure to google eeglablist and "your topic" for past eeglab list comments related to your situation.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 20, 2017 at 7:03 AM, Federica Molteni <span dir="ltr"><<a href="mailto:federica.molteni@univr.it" target="_blank">federica.molteni@univr.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I have done preprocessing of my data with Fieldtrip and would like to load it into EEGLAB.<br>
<br>
At first I have tried to load it as matlab file, but got this error:<br>
<br>
pop_editset(): raw data file 'E:\Matlab_code\new pipeline\neglect\1_AM_data_<wbr>pICA_clean.mat' found<br>
eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames<br>
Creating a new ALLEEG dataset 1<br>
Done.<br>
Undefined function 'isnan' for input arguments of type 'struct'.<br>
<br>
Error in eeglab>updatemenu (line 1560)<br>
    if ~isempty(ALLEEG) & CURRENTSET~= 0 & ~isequal(EEG.data, ALLEEG(CURRENTSET).data) & ~isnan(EEG.data(1))<br>
<br>
Error in eeglab (line 368)<br>
                        updatemenu;<br>
<br>
Error while evaluating Menu Callback<br>
<br>
So I have tried to use the function fieldtrip2eeglab, but I am probably making some mistakes because this is what happened:<br>
<br>
Undefined variable "data" or class "data.trial".<br>
<br>
Error in fieldtrip2eeglab (line 20)<br>
for i=1:size(data.trial,2)<br>
<br>
Do you have any idea about what I'm doing wrong or do you have any suggestions?<br>
<br>
Best,<br>
Federica<br>
______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.<wbr>ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.<wbr>edu</a><br>
</blockquote></div><br></div>