<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000">Hi, </font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000">I need help solving an error that happens with Mac (Matlab2020a) but not with Win (Matlab2017a), both using Fieldtrip 20191127. </font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000"><br></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000">The error occurs launching the ft_preprocessing and it's:</font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#ff0000"><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline">Check for missing argument or incorrect argument data type in call to function 'offset2time'.</span></font><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline"><font color="#ff0000">Error in ft_preprocessing (line 594)<br></font></div><font color="#ff0000"><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline">        tim = offset2time(offset, hdr.Fs, size(dat,2));</span>  </font><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#ff0000"><br></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000">Here the code (I call this after ft_definetrial, using a customized <span style="font-family:Arial,Helvetica,sans-serif">cfg.trialfun, which is working fine</span>):</font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="color:rgb(0,0,0)"></span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#93c47d"><span style="font-family:Arial,Helvetica,sans-serif">%%%%%%%</span>%% Parameters for pre-processing%%%%%%</font></div><div class="gmail_default" style="font-family:tahoma,sans-serif">cfg.channel = {'A*', 'B*', 'EXG1', 'EXG2', 'EXG3', 'EXG4','Status'};<br>cfg.reref = 'yes';<br>cfg.refchannel = {'EXG3','EXG4'}; % mastoids<br>cfg.dftfilter  = 'yes';<br>cfg.dftfreq    = [50 100 150];<br>cfg.detrend   = 'yes'; <br>cfg.demean = 'no'; </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br>    data = ft_preprocessing(cfg);<font color="#000000"><br></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#93c47d"><span style="font-family:Arial,Helvetica,sans-serif">%%%%%%%</span>%% %%%%%%%%%%%%%%%%%%%%</font><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#93c47d"><br></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000">Thanks</font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000">Manu</font></div></div>