Table 2.
Matlab code |
---|
%% Structure for BEM volume conduction model |
%% Each layer mesh is indexed by k |
% vol.bnd(k).pnt. : vertices for mesh "k" |
% vol.bnd (k).tri : triangles for mesh "k" |
% %% Set the conductivities of each domain |
% vol .cond : conductivities |
%% EEG electrodes |
% sens.pnt : locations of electrodes |
%% Positions of the dipoles |
% pos :locations of dipoles |
%% Compute the BEM |
% choose BEM method (OpenMEEG, BEMCP or Dipoli) |
cfg.method = 'openmeeg'; |
% Compute the BEM matrix |
vol = ft_prepare_bemmodel(cfg, vol); |
cfg. vol = vol; |
cfg. grid. pos = pos; |
cfg. elec = sens; |
% Compute leadfield |
% with no orientation constraint |
lf_openmeeg = ft_prepare_leadfield(cfg); |
Demo script for computing an EEG forward problem with OpenMEEG in Fieldtrip.