<span>Hi,</span><div><br></div><div>I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version) </div>
<div><br></div><div><p>C21 = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1));</p></div><div><div>the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. </div>
<div><br></div><div>If anyone has suggestions on how I could go from here, it'll be greatly appreciated.</div><div>Thanks in advance, Akiko </div></div><div><br></div>-- <br><font><span style="font-family:arial,helvetica,sans-serif">Akiko Ikkai, Ph.D. <br>
Postdoctoral Fellow<br style="font-family:arial,helvetica,sans-serif"></span></font><font style="font-family:arial,helvetica,sans-serif" face="'PrimaSans BT,Verdana,sans-serif'" size="2">Department of
Psychological and Brain Sciences<br>Johns Hopkins University<br>Ames
Hall, 3400 N. Charles St.<br>Baltimore, MD 21218</font><br style="font-family:arial,helvetica,sans-serif"><br><br>