<div dir="ltr">Dear all,<br><br>Currently I am trying to do the Dipole fitting on the MEG data. I have 1 problem that puzzled me, in particular,<br><br> When I did dipole on individual subject,I used the scripts according to  to one posted in the Fieldtrip website, it runs ok but  I get only null result (naked MRI picture without any dipole inside.) <br>

<br>
I was told that 
"Local minimum possible. fminunc stopped because the size of the current step is less than
the default value of the step size tolerance."<br><br>However, the same data I used SPM8, I get can get dipole. So I wonder is there anything wrong with my scripts?  I hope I can get your kind help. Thanks very much in advance.<br>



--<br>load s2TL42<br>figure<br>plot(1000*s2TL42.time, s2TL42.avg)  % convert time to ms<br>xlabel('time (ms)')<br>ylabel('field amplitude (T)')<br>axis tight<br>grid on<br><br>cfg = [];<br>cfg.xlim = 0.1:0.025:0.2;<br>



cfg.colorbar = 'no';<br>cfg.comment = '';<br>cfg.showxlim = 'no';<br>cfg.showzlim = 'no';<br>cfg.layout   = '4D248.lay';<br>cfg.zlim = [-1.5 1.5] * 1e-13;<br>figure<br>ft_topoplotER(cfg, s2TL42);<br>



<br>cfg            = [];<br>cfg.latency    = [0.15 0.18];  % specify latency window around M165 peak<br>cfg.numdipoles = 1;<br>cfg.vol        = vol;<br>cfg.feedback   = 'textbar';<br>cfg.resolution = 2;<br>dip             = ft_dipolefitting(cfg, s2TL42);<br>



<br>sMRI = read_mri(fullfile(spm('dir'), 'canonical', 'single_subj_T1.nii')); <br>% the source is expressed in cm<br>cfg = [];<br>cfg.location = dip.dip.pos*10;   % convert from cm to mm<br>cfg.interactive='yes';<br>



figure; ft_sourceplot(cfg, sMRI); <br>---------------<br><br>Best,<br>Feng<br><br><br>
</div>
<p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>