<div dir="ltr">Dear FieldTrip users,<div><br></div><div>I've been trying to use my manually created data structure containing averaged ERP from 28 subjects and 61 channels, each lasting 1075 time points as per these instructions: <a href="http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat">http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat</a></div><div><br></div><div><b>data.mat:</b></div><div>label: {61x1 cell}<br></div><div><div>fsample: 250</div><div>trial: {1x28 cell}</div><div>  columns: [61x1075 double]</div><div>time: {1x28 cell}</div><div>elec: [1x1 struct]</div><div><div>  chanpos: [61x3 double]</div><div>  elecpos: [61x3 double]</div><div>  label: {61x1 cell}</div><div>  unit: 'cm'</div></div><div>avg: [61x1075 double]</div></div><div><br></div><div>to construct ERP topoplots using ft_topoplotER() and whatever else will be needed for a timelocked analysis (I've already used the same data structure to do a permutation test with success).</div><div><br></div><div>To do that, I've been following this tutorial: <a href="http://www.fieldtriptoolbox.org/tutorial/plotting#topoplot_functions">http://www.fieldtriptoolbox.org/tutorial/plotting#topoplot_functions</a></div><div><br></div><div>> cfg = [];</div><div>> cfg.xlim = [450 500] % arbitrary time interval</div><div>> cfg.layout = 'M10.lay' % custom layout; the provided easycapM10.mat has different labels</div><div><br></div><div>> ft_topoplotER(cfg, data)<br></div><div><br></div><div>This, however, produced the following error:</div><div><br></div><div><div><i>Reference to non-existent field 'topo'.</i></div><div><i><br></i></div><div><i>Error in ft_datatype_comp (line 92)</i></div><div><i>      if size(comp.topo,1)==size(comp.topo,2)</i></div><div><i><br></i></div><div><i>Error in ft_checkdata (line 358)</i></div><div><i>      data = ft_datatype_comp(data);</i></div><div><i><br></i></div><div><i>Error in topoplot_common (line 74)</i></div><div><i>data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'});</i></div><div><i><br></i></div><div><i>Error in ft_topoplotER (line 192)</i></div><div><i>cfg = topoplot_common(cfg, varargin{:});</i></div></div><div><br></div><div>Using common sense, I ‘fixed’ topoplot_common.m by changing the order of cell parameters at line 74 so that 'timelock' was before 'comp' and it worked – I can see no errors and the topoplots look okay.</div><div><br></div><div><br></div><div>Could you please help me understand what's the issue? Although it works now, I would like to future-proof my data and make it all reproducible.</div><div><br></div><div>I think it's trying to figure out whether my data is timelocked, in the frequency domain, or perhaps a composite, but it seems that the detection algorithm is either faulty (I haven't seen this ‘topo’ field in any example so far) or my data structure is missing something (I couldn't find another topoplot-ready EEG data among the tutorial files to compare them, unfortunately, and MEG files appear to be considerably different).</div><div><br></div><div>Thank you!</div><div><br></div><div>Best wishes,</div><div>Harold</div></div>