Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
example:combined_eeg_and_meg_source_reconstruction [2013/08/05 18:02]
141.2.203.253 [Matlab script]
example:combined_eeg_and_meg_source_reconstruction [2017/08/17 11:21] (current)
Line 31: Line 31:
 % create a set of magnetometers,​ randomly placed around the sphere % create a set of magnetometers,​ randomly placed around the sphere
 grad = []; grad = [];
-grad.pnt = randn(64,​3);​ +grad.coilpos ​= randn(64,​3);​ 
-dum = sqrt(sum(grad.pnt.^2,2)); +dum = sqrt(sum(grad.coilpos.^2,2)); 
-grad.pnt = grad.pnt ./ [dum dum dum] * 1.2;  % scale them to a unit sphere and shift outward a bit +grad.coilpos ​= grad.coilpos ​./ [dum dum dum] * 1.2;  % scale them to a unit sphere and shift outward a bit 
-grad.ori = grad.pnt ./ [dum dum dum];        % unit length+grad.coilori ​= grad.coilpos ​./ [dum dum dum];        % unit length
 for i=1:64 for i=1:64
   grad.label{i} = sprintf('​meg%03d',​ i);   grad.label{i} = sprintf('​meg%03d',​ i);