<div dir="ltr">Hi,<div><br></div><div style>I had to re-install ubuntu in order to provide more space for the analysis (since I was having the problem with the temporary files, which might have been too large for my ubuntu partition). </div>
<div style>But now the problem I have with the "<span style="font-family:arial,sans-serif;font-size:13px">ft_prepare_headmodel" is even weirder than before. The program now is complaining that there is no dipoli for my system:</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">cfg        = [];</font></div><div><font face="arial, sans-serif">cfg.method ='dipoli'; </font></div>
<div><font face="arial, sans-serif">vol        = ft_prepare_headmodel(cfg, segmentedmri);</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br>
</font></div><div><font face="arial, sans-serif">??? Error using ==> ft_headmodel_dipoli at 138</font></div><div><font face="arial, sans-serif">there is no dipoli executable for your platform</font></div><div><font face="arial, sans-serif"><br>
</font></div><div><font face="arial, sans-serif">Error in ==> ft_prepare_headmodel at 226</font></div><div><font face="arial, sans-serif">      vol = ft_headmodel_dipoli(geometry,'conductivity',cfg.conductivity,'isolatedsource',cfg.isolatedsource);</font></div>
<div><br></div><div><br></div><div style>I am running this script in a 2010b matlab version, installed in ubuntu 12.04. It should be working fine, right?</div><div style><br></div><div style>Thanks in advance,</div><div style>
Ricardo</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 28 March 2013 14:39, Ricardo Moura <span dir="ltr"><<a href="mailto:ricardoojm@gmail.com" target="_blank">ricardoojm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi Jörn, <br>thank you very much for your response!<br></div>I checked the segmentation and everything seems to be ok (as far as I can say... No error messages were shown during the processing and I checked the generated objects and plots).<br>

<br></div>But I had a strange error while preparing the head model. Somehow the command cannot find the dipoli files, even thought they are really where they should be. And the second message ("/tmp/tp2619f3f3_574d_478a_bfbb_01193b4f8e0c.ama'") I really have no clue of what it means.<br>

<br></div>And I am running this command on a ubuntu 12.04 32-bit.<br><br></div>Do you have any idea of how I can solve it?<br><br></div>Thanks once again,Best,<br>Ricardo<br><br><div><div><div><div><div>using the executable "/usr/local/MATLAB/R2012a/toolbox/fieldtrip-20130314/external/dipoli/dipoli"<br>

/tmp/tpd4e382c9_74a1_402d_be1a_6d2c82e749cc.sh: 3: /tmp/tpd4e382c9_74a1_402d_be1a_6d2c82e749cc.sh: /usr/local/MATLAB/R2012a/toolbox/fieldtrip-20130314/external/dipoli/dipoli: not found<br>Warning: an error ocurred while running dipoli <br>

> In ft_headmodel_dipoli at 201<br>  In ft_prepare_headmodel at 226 <br><br>Error using fread<br>Invalid file identifier.  Use fopen to generate a valid file identifier.<br>Warning: File '/tmp/tp2619f3f3_574d_478a_bfbb_01193b4f8e0c.ama' not found. <br>

> In ft_headmodel_dipoli at 209<br>  In ft_prepare_headmodel at 226 <br></div></div></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 27 March 2013 13:10, Ricardo Moura <span dir="ltr"><<a href="mailto:ricardoojm@gmail.com" target="_blank">ricardoojm@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear all<br><div>I am creating a BEM model for eeg, following the appropriate tutorial, but I have a problem when preparing the headmodel. The output I have from the ft_prepare_headmodel command does not contain the "mat", and so, when I try to generate the leadfield, it returns an error message due to non existent "mat". I saw that other users had similar problem, but I haven't found a solution though. So, what is wrong with my script?</div>


<div><br></div><div>Thanks a lot in advance!</div><div>Best,</div><div>Ricardo</div></div></div><div><br><br><br><br>load standard_mri.mat<br>mri_orig=mri;<br>disp(mri)<br><br>% Segmenting the data<br>cfg = [];<br>cfg.output= {'scalp','skull','brain'};<br>



segmentedmri  = ft_volumesegment(cfg, mri_orig);<br>disp(segmentedmri)<br>save segmentedmri segmentedmri<br><br>% MESH <br>cfg=[];<br>cfg.tissue={'brain','skull','scalp'};<br>cfg.numvertices = <a href="tel:%5B3000%202000" value="+5530002000" target="_blank">[3000 2000</a> 1000];<br>



bnd=ft_prepare_mesh(cfg,segmentedmri);<br>disp(bnd(1))   <br><br>% Head Model = variavel vol<br>cfg        = [];<br>cfg.method ='bem_dipoli'; %dipoli singlesphere<br>vol        = ft_prepare_headmodel(cfg, segmentedmri); <br>


<br><br>>> disp(vol)<br></div>             bnd: [1x3 struct]<br>            cond: [0.3300 0.0041 0.3300]<br>    skin_surface: 1<br>          source: 3<br>
            type: 'dipoli'<br>            unit: 'mm'<br>             cfg: [1x1 struct]<br><br><div><br><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>