<div dir="ltr"><font face="arial, sans-serif">Dear all,</font><div><font face="arial, sans-serif"><br></font><div><div style="box-sizing:border-box"><font face="arial, sans-serif" style="">I have a question about brain vision preprocessed EEG data importing to the Filedtrip; </font></div><div style="box-sizing:border-box"><font face="arial, sans-serif" style=""><br></font></div><div style="box-sizing:border-box"><font face="arial, sans-serif" style="">Normally, I was using the below code for it, which worked perfectly so many times. But, with the newest versions of the Fieldtrip I am getting the warning: "Warning: endsample is before begsample, returning empty data", and it ends up with the trial structure where only the last trial is read and the previous ones appear blank... I searched blogs and Fieldtrip mailing list, however, didn't find any topic on that problem. I am sharing the script I am using below. If you have any suggestions or ideas I would be very grateful. Thanks!</font></div><div style="box-sizing:border-box;font-family:"Segoe UI",system-ui,"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:14px"><br></div>path = 'C:\Vision\Analyzer2\export\';<br><br>% Subject Lists<br>subjs = {'t01' 't02' 't03' 't04' 't05'};<br><br>% Condition Lists<br>cond = {'Segmentation_-1500_1500_aud_post' 'Segmentation_-1500_1500_aud_pre'};<br><br>for i=1:length(subjs)<br>    for k=1:length(cond)<br>        cfg                 = []; <br>        cfg.trialfun        = 'ft_trialfun_brainvision_segmented'; <br>        cfg.continuous      = 'no';   <br>        cfg.demean          = 'yes';  <br>        cfg.baselinewindow  = [-200 0];  <br>        cfg.dataset         = [path subjs{i} cond{k} '.eeg']; <br>        cfg.headerfile      = [path subjs{i} cond{k} '.vhdr'];<br><br>        cfg = ft_definetrial(cfg); <br>    <br>        if k == 1<br>            subj(i).aud_post = ft_preprocessing (cfg); <br>        elseif k == 2<br>            subj(i).aud_pre = ft_preprocessing (cfg); <br>            <br>        end<br>    end<br><div style="box-sizing:border-box;font-family:"Segoe UI",system-ui,"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:14px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:small">end</span> </div><div><br></div><div>Best regards,</div><div>Tuba </div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>Tuba Aktürk</b></div><div><b><br></b></div><div><i style="color:rgb(0,0,0)">PhD Student<br>Cognitive Neuroscience, Psychology and Neuroscience, Maastricht University </i><i style="color:rgb(0,0,0)">&</i></div><div><i style="color:rgb(0,0,0)">Neuroscience, Graduate School of Health Science, Istanbul Medipol University</i><i style="color:rgb(0,0,0)"><br></i></div><div><br></div></div></div></div></div></div>