<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi everyone,<div><br></div><div>i'm trying to help out a colleague who is trying to analyse some auditory evoked potential (EEG) data and for the research question at hand it would be nice to separate left vs. right hemisphere. we want to keep things simple first by fitting symmetric dipoles to e.g. the N1 and then use the positions to estimate the dipole moments for the entire ERP. the ERP that we want to build the source montage on is calculated from ~600 trials, i.e. we see what we need to see very nicely.</div><div><br></div><div>we are using a spherical headmodel (electrode positions also on sphere) as described on the FT homepage:</div><div>vol = [];<br>vol.r = [0.88 0.92 1.00]; % radii of spheres<br>vol.c = [1 1/80 1];       % conductivity<br>vol.o = [0 0 0];        </div><div><br></div><div>using a precomputed leadfield i the turn to ft_dipolefitting:</div><div><div>cfg      = [];</div><div>cfg.vol  = vol;         % see above</div><div>cfg.elec = data.elec;        % see above</div><div>cfg.gridsearch = 'yes';</div><div>cfg.numdipoles=2;</div><div>cfg.symmetry='y'; %nach den elec.pnt sieht es so aus als wäre y links / rechts</div><div>cfg.grid=lf;</div><div>cfg.latency=[.05 .1];</div><div><br></div><div>dip1 = ft_dipolefitting(cfg, avgbl);</div></div><div><br></div><div>i get following message:</div><div>...<br><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">scanning grid location 279/280</font></div><div><font class="Apple-style-span" color="#000000">scanning grid location 280/280</font></div><div><font class="Apple-style-span" color="#000000">found minimum after scanning on grid point [-0.111111 0.111111 0.111111; -0.111111 -0.111111 0.111111]</font></div><div><font class="Apple-style-span" color="#000000">                                                        First-order </font></div><div><font class="Apple-style-span" color="#000000"> Iteration  Func-count       f(x)        Step-size       optimality</font></div><div><font class="Apple-style-span" color="#000000">     0           4        0.0406088                           0.5</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">Local minimum possible.</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">fminunc stopped because it cannot decrease the objective function</font></div><div><font class="Apple-style-span" color="#000000">along the current search direction.</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000"><stopping criteria details></font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">found minimum after non-linear optimization on [-0.111111 0.111111 -0.111111; -0.111111 -0.111111 -0.111111]</font></div></blockquote></div><div><br></div><div>i then ran the tutorial example here:</div><div><a href="http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit">http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit</a></div><div>just to check if there may be something fundamentally wrong with my code.</div><div><br></div><div>however i get a similar message suggesting something went wrong:</div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">scanning grid location 26/27</font></div><div><font class="Apple-style-span" color="#000000">scanning grid location 27/27</font></div><div><font class="Apple-style-span" color="#000000">found minimum after scanning on grid point [0 0.5 0.5]</font></div><div><font class="Apple-style-span" color="#000000">                                                        First-order </font></div><div><font class="Apple-style-span" color="#000000"> Iteration  Func-count       f(x)        Step-size       optimality</font></div><div><font class="Apple-style-span" color="#000000">     0           4        0.0293345                         0.303</font></div><div><font class="Apple-style-span" color="#000000">     1           8        0.0079586              1           0.15  </font></div><div><font class="Apple-style-span" color="#000000">     2          12      5.63895e-05              1         0.0138  </font></div><div><font class="Apple-style-span" color="#000000">     3          16      5.75471e-06              1        0.00446  </font></div><div><font class="Apple-style-span" color="#000000">     4          20      8.86701e-11              1       1.33e-05  </font></div><div><font class="Apple-style-span" color="#000000">     5          24      1.45576e-14              1        1.3e-07  </font></div><div><font class="Apple-style-span" color="#000000">     6          28      1.75862e-16              1       2.61e-08  </font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">Local minimum possible.</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">fminunc stopped because the size of the current step is less than</font></div><div><font class="Apple-style-span" color="#000000">the default value of the step size tolerance.</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000"><stopping criteria details></font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">found minimum after non-linear optimization on [-5.08281e-09 0.5 0.3]</font></div></blockquote></div><div><br></div><div>I am using Matlab 2010b. a fairly recent fieldtrip (~3 months old or so). </div><div><br></div><div>there was a similar question on the archives, however i found no answer:</div><div><a href="http://mailman.science.ru.nl/pipermail/fieldtrip/2010-May/002874.html">http://mailman.science.ru.nl/pipermail/fieldtrip/2010-May/002874.html</a></div><div><br></div><div>is this an issue related to the matlab version and the fminunc function?</div><div><br></div><div>i would be grateful about any suggestion.</div><div><br></div><div>cheers,</div><div>nathan</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></body></html>