<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">HI Fieldtrip experts!<div><br></div><div>I'm trying to align a headmodel (the one from example "Subject1") with my MEG sensors (Yokogawa system).</div><div><br></div><div>I'm trying to do that interactively, in order to construct a Leadfied matrix as accurate as possible. To do that, I am testing this code:</div><div><br></div><div><div><i>cfg = [];</i></div><div><i>cfg.method = 'interactive';</i></div><div><i>cfg.headshape = vol.bnd(1);</i></div><div><i>cfg.senstype = 'meggrad';</i></div><div><i>grad_aligned = ft_sensorrealign(cfg, grad); % Im using ft_sensorrealign cause I think is the MEG version of ft_electroderealign</i></div></div><div><br></div><div>The variables employed consist of:</div><div><div><b>>> grad = </b></div><div>struct with fields:</div><div><ul><li>balance: [1×1 struct]<br></li><li>chanori: [160×3 double]<br></li><li>chanpos: [160×3 double]<br></li><li>chantype: {160×1 cell}<br></li><li>chanunit: {160×1 cell}<br></li><li>coilori: [320×3 double]<br></li><li>coilpos: [320×3 double]<br></li><li>label: {160×1 cell}<br></li><li>tra: [160×320 double]<br></li><li>type: 'yokogawa160'<br></li><li>unit: 'cm'<br></li><li>fid: [1×1 struct]<br></li></ul></div></div><div><br></div><div><div><b>>> vol.bnd(1) =</b></div><div>struct with fields:</div><div><ul><li>pos: [1000×3 double]<br></li><li>tri: [1996×3 double]<br></li><li>coordsys: 'ctf'<br></li></ul></div></div><div>I have looked at the tutorial for EEG sensors realignment, and I have copied the procedure, since there is not a specific tutorial for MEG sensors. I thought it would be the same, but when executing it I obtain the following errors:</div><div><br></div><div><div><i><b>>> </b>Undefined function 'fixpos' for input arguments of type 'struct'.</i></div><div><i><br></i></div><div><i>Error in ft_sensorrealign (line 255)</i></div><div><i>headshape = fixpos(cfg.headshape);</i></div><div><i><br></i></div><div><i>Error in generating_leadfield (line 63)</i></div><div><i>grad_aligned = ft_sensorrealign(cfg, grad);</i></div></div><div><br></div><div>Does anybody know how to do that, or how to do an interactive realignment with MEG sensors?</div><div><br></div><div>Thanks in advance.</div><div>Víctor.</div><div><br></div><div>Víctor Rodríguez González</div><div>Grupo de Ingeniería Biomédica, ETSIT.</div><div>Universidad de Valladolid, España.</div><div><br></div></div></div></div></div></div>