[FieldTrip] Question connectivity analysis / ICA / MVAR

Martin Winkels m_wink10 at uni-muenster.de
Mon Apr 22 20:36:18 CEST 2013


Hello Guys,

I am trying to perform connectivity analysis in sensor domain (fieldtrip
and matlab are up to date). Within doing that I am facing a small problem
in the ICA analysis in combination with a MVAR analysis. If I execute the
following code, I get an error message as follows:


Error using chol
Matrix must be positive definite.

Error in armorf (line 40)
ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))');

Error in ft_mvaranalysis (line 390)
            [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}),
size(tmpdata.trial{1},2), cfg.order);

Error in mu_firstexample (line 90)
mdata           = ft_mvaranalysis(cfg, data_ma_ica);


Can anybody help me with that issue?


% artifact correction: ica component analysis

cfg             = [];
cfg.method      = 'runica';
cfg.runica.pca   = 40;
comp            = ft_componentanalysis(cfg, data_ma);

cfg             = [];
cfg.layout      = 'CTF275.lay';
cfg.viewmode    = 'component';
ft_databrowser(cfg, comp)

%% artifact correction: ica component rejection

cfg             = [];
cfg.component   = [4]; % to be removed component(s)
data_ma_ica     = ft_rejectcomponent(cfg, comp, data_ma);

%% compute MVAR, spectral transfer and granger

% mvar
cfg             = [];
cfg.order       = 5;
cfg.toolbox     = 'bsmart';

mdata           = ft_mvaranalysis(cfg, data_ma_ica);


Thank you,

-- 
Martin Winkels

B.Sc. / Ingenieur in
Medizininformatik und Biomedizintechnik

University of M√ľnster

phone: +49 177 6090603
mail: m_wink10 at uni-muenster.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130422/83bb0c90/attachment-0001.html>


More information about the fieldtrip mailing list