Dear all,<br> <br>I am a new comer for using fieldtrip toolbox.  I am a Mphil student of The University of Hong Kong, and my research is about source analysis for EEG oscillation.<br>At the moment, I confront some problems in simulation when using fieldtrip to do source analysis. <br>
 <br>Firstly, I have tried the matlab codes on the website of <a href="http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan">http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan</a>. When I change the  dipole position, such as [3 8 8], the reconstructed source is also located at [0 0 4]. I have confirmed the simulation data, which is right and varied accroding to the dipole position. However, for the source analysis result, it doesn't change, and stills locates at the position of [0 0 4]. It seems that the problems lies at the function of ft_sourceanalysis ft_sourceanalysis. I am quite confused and hope to get a clear explaination. And thanks very much. <br>
 <br>Secondly, I have alligned my electrode file to the standard BEM head model. Then I undertook source analysis for timelocked EEG activities for simulation according to the following codes:<br> <br>clear all<br>clc<br>
load headmodel.mat<br>cfg = [];<br>cfg.vol = vol;<br>cfg.elec = elec;<br>cfg.dip.pos = [0 -20 100];    % the dipole is located at about Cz channel<br>cfg.dip.mom = [0 0 1]';   % the dipole points along the x-axis<br>cfg.relnoise = 0;<br>
cfg.ntrials = 20;<br>data = ft_dipolesimulation(cfg);<br>% compute the data covariance matrix, which will capture the activity of<br>% the simulated dipole<br>cfg = [];<br>cfg.covariance = 'yes';<br>timelock = ft_timelockanalysis(cfg, data);<br>
% do the beamformer source reconstuction on a 10 mm grid<br>cfg = [];<br>cfg.vol = vol;<br>cfg.elec=elec;<br>cfg.grid.resolution = 10;<br>cfg.method = 'lcmv';<br>source = ft_sourceanalysis(cfg, timelock);<br>cfg            = [];<br>
cfg.downsample = 2;<br>sourcePostInt  = ft_sourceinterpolate(cfg, source , mri);<br>cfg = [];<br>cfg.method        = 'ortho';<br>cfg.funparameter  = 'avg.pow';<br>cfg.maskparameter = cfg.funparameter;<br>cfg.opacitymap    = 'rampup';  <br>
figure<br>ft_sourceplot(cfg, sourcePostInt);<br> <br>However, it still doesn't work, and the source is located at wrong position. I have no idear and worked on it for several days. So I am writing to your to ask for help, my headmodel file in the *.mat type can be downloaded in <a href="http://www.sendspace.com/file/lars5j">http://www.sendspace.com/file/lars5j</a> .<br>
Thanks again for all your help.<br> <br>Best regards,<br> <br>Weiwei Peng