[FieldTrip] Mvaranalysis error

masoud masoudheshmatibnd at gmail.com
Sat Dec 10 15:56:43 CET 2022


Hello dear fieldtrip community
I have been using fieldtrip for quite awhile now and now I am dealing with
mvar analysis, I preprocessed the data and now I am doing it's multivariate
autoregressive Analysis, and also i have read the document of the function.
here is my code:

cfg = [];
load('1-1alpha.mat')
load('toi.mat')
cfg.method = 'granger';
cfg.trials = 'all';
cfg.method = 'bsmart';
cfg.t_ftimwin = 5;
cfg.toi = toi;
cfg.output = 'parameters';
mvardata = ft_mvaranalysis(cfg, data);

And the error is:

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 488)
              [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}),
size(tmpdata.trial{1},2), cfg.order);

Error in Untitled6 (line 13)
mvardata = ft_mvaranalysis(cfg, data);



I would very much appreciate it if anyone can help me solve this problem
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221210/c7b23612/attachment.htm>


More information about the fieldtrip mailing list