<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello FieldTrip community,<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>I'm working through the Beamformer tutorial on this page (<a title="Ctrl+Click or tap to follow the link" id="LPlnk933248" href="http://www.fieldtriptoolbox.org/tutorial/beamformer">http://www.fieldtriptoolbox.org/tutorial/beamformer</a>) using MEG data
 from a saccade task.<a title="Ctrl+Click or tap to follow the link" id="LPlnk923360" href="http://www.fieldtriptoolbox.org/tutorial/beamformer"></a></p>
<p><a id="LPlnk923360" href="http://www.fieldtriptoolbox.org/tutorial/beamformer"><br>
</a></p>
<p><br>
</p>
<p>This code for constructing the head model, copied from the page, is giving me an error:
<br>
</p>
<p></p>
<div>    % forward model mri<br>
    segmentedmri = load('C:\Users\EEG1\Documents\Data\segmentedmri.mat');<br>
    cfg = [];<br>
    cfg.method = 'singleshell';<br>
    headmodel = ft_prepare_headmodel(cfg, segmentedmri);</div>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p>This is the complete text of the error: <br>
</p>
<p></p>
<div>Error using ft_convert_units (line 150)<br>
cannot determine geometrical units<br>
<br>
Error in ft_checkdata (line 543)<br>
  data = ft_convert_units(data);<br>
<br>
Error in ft_prepare_headmodel (line 203)<br>
  data = ft_checkdata(data, 'hasunit', 'yes');<br>
<br>
Error in LindseysBF (line 48)<br>
    headmodel = ft_prepare_headmodel(cfg, segmentedmri);<br>
<br>
<br>
When I check the struct segmentedmri, it has a field called unit with a value of 'mm.' Because this code is using a file downloaded from the tutorial (i.e., segmentedmri, which can be downloaded from the link above) and is copy/pasted from the tutorial page,
 I can't figure out what's wrong or what to investigate. Can someone tell me if I'm making an error in the code, if there's something I could change about the code to make it work, or if this is a bug? Any help would be greatly appreciated.<br>
<br>
<br>
Thank you,<br>
<br>
Lindsey Tate<br>
Graduate Research Assistant <br>
Brian and Biomarker Lab<br>
University of Oklahoma<br>
</div>
<br>
<p></p>
</div>
</body>
</html>