<p dir="ltr">Hi Federico, </p>
<p dir="ltr">No idea whether this matters (haven't tested it), but perhaps the error is due to sens.fid.label being a column cell array (3x1) and cfg.target.label being a row (1x3)?</p>
<p dir="ltr">Best, <br>
Eelke </p>
<div class="gmail_quote">Op 7 jul. 2014 11:38 schreef  <<a href="mailto:f.chella@unich.it">f.chella@unich.it</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
<br>
I am getting an error when I use ft_sensorrealign to align my MEG sensor (i.e., ITAB MEG sensor) with the subject mri using fiducials.<br>
<br>
Below is the code I am using.<br>
I first specified the fiducial location in the sensor space in the field sens.fid:<br>
 sens.fid.pnt(1,:) = [0   101.5    0] ;<br>
 sens.fid.pnt(2,:) = [-69.9    -0.6    0.8];<br>
 sens.fid.pnt(3,:) = [69.9     0.6   -0.8];<br>
 sens.fid.label{1} = 'nasion';<br>
 sens.fid.label{2} = 'left';<br>
 sens.fid.label{3} = 'right';<br>
<br>
and then I called ft_sensorrealign:<br>
 cfg = [];<br>
 cfg.method   = 'fiducial';<br>
 cfg.fiducial = {'nasion', 'left', 'right'};<br>
 cfg.target.pnt(1,:) = [-0.5    86.5   -15.5];<br>
 cfg.target.pnt(2,:) = [-73.5   -7.5  -43.5];<br>
 cfg.target.pnt(3,:) = [69.5  -16.5  -44.5];<br>
 cfg.target.label    = {'nasion', 'left', 'right'};<br>
 sens_realigned = ft_sensorrealign(cfg,sens);<br>
<br>
Now, I get the following error:<br>
<br>
 ??? Subscripted assignment between dissimilar structures.<br>
 Error in ==> ft_sensorrealign at 235<br>
     tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes<br>
<br>
Does anyone know why this would be occurring and how to fix it?<br>
Thanks in advance for the help.<br>
<br>
<br>
Federico Chella, Ph.D.<br>
Dept. of Neuroscience, Imaging and Clinical Sciences<br>
ITAB ? Institute for advanced Biomedical Technologies<br>
 ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy<br>
<br>
______________________________<u></u>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/<u></u>mailman/listinfo/fieldtrip</a><br>
</blockquote></div>