<div dir="ltr">Hello Guys,<br><div class="gmail_quote"><div dir="ltr"><div><div><br></div><div>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:<br>
<br><br>
</div>Error using chol<br>Matrix must be positive definite.<br><br>Error in armorf (line 40)<br>ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))');<br><br>Error in ft_mvaranalysis (line 390)<br> [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order);<br>
<br>Error in mu_firstexample (line 90)<br>mdata = ft_mvaranalysis(cfg, data_ma_ica);<br> <br><br></div>Can anybody help me with that issue?<br><div><div><br><div><br>% artifact correction: ica component analysis <br>
<br>cfg = [];<br>cfg.method = 'runica'; <br>cfg.runica.pca = 40;<br>
comp = ft_componentanalysis(cfg, data_ma);<br><br>cfg = [];<br>cfg.layout = 'CTF275.lay';<br>cfg.viewmode = 'component';<br>ft_databrowser(cfg, comp)<br><br>%% artifact correction: ica component rejection<br>
<br>cfg = [];<br>cfg.component = [4]; % to be removed component(s)<br>data_ma_ica = ft_rejectcomponent(cfg, comp, data_ma);<br><br>%% compute MVAR, spectral transfer and granger<br><br>% mvar<br>cfg = [];<br>
cfg.order = 5;<br>cfg.toolbox = 'bsmart';<br><br>mdata = ft_mvaranalysis(cfg, data_ma_ica);<br><br><br></div><div>Thank you,<br clear="all"></div><div><br>-- <br>Martin Winkels<br><br>B.Sc. / Ingenieur in<div>
Medizininformatik und Biomedizintechnik<div>
<br>University of Münster<br><br>phone: <a href="tel:%2B49%20177%206090603" value="+491776090603" target="_blank">+49 177 6090603</a><br>mail: <a href="mailto:m_wink10@uni-muenster.de" target="_blank">m_wink10@uni-muenster.de</a></div>
</div>
</div></div></div></div>
<br></div><br></div>