[FieldTrip] Computing connectivity matrix EEG 'array exceeds maximum array size preference'

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu Mar 4 09:01:40 CET 2021


Hi Rene,

I would recommend you to take a step back and think a bit about what you try to achieve. It looks as if you want to compute an all-pairwise connectivity matrix for source-reconstructed EEG, where the number of dipolar sources is more than 40.000. Does your underlying scientific question require you to have that many sources? Related to this, is there a reason to assume that the spatial resolution of your reconstruction will be so high that it requires such a high spatial resolution?

If the answer to both those questions is ’no’, you should consider to use a source model that has way fewer dipole positions, e.g. on the order of 4000 or so.

On the off chance that the answer to one (or both) of the above questions is ‘yes’, you should get yourself a big computer, with a lot of RAM, and a MATLAB configuration that can handle very big matrices.

Best wishes,
Jan-Mathijs


> On 3 Mar 2021, at 19:10, Andrade Rey René <rene.andrade at edu.uah.es> wrote:
> 
> Dear Fieldtrip experts:
> 
> I am trying to run a modified version of the field trip tutorial for connectivity analysis for eeg. I am still struggling for one issue. 
> 
> Requested 42432x42432 (26.8GB) array exceeds maximum array size preference. Creation of
> arrays greater than this limit may take a long time and cause MATLAB to become unresponsive.
> See array size limit or preference panel for more information.
> 
> Error in univariate2bivariate (line 263)
>          data.crsspctrm = (mom*mom')./nrpt;
> 
> Error in ft_connectivityanalysis (line 488)
>        [data, powindx, hasrpt] = univariate2bivariate(data, 'mom', 'crsspctrm', dtype,
>        'channelcmb', cfg.refindx, 'keeprpt', 0);
> 
> Error in fieldtrip_coherence (line 225)
> source_conn = ft_connectivityanalysis(cfg, source);
> 
> 
> How could I overcome this issue? Dividing the sample?
> 
> Best,
> Rene Andrade. 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202




More information about the fieldtrip mailing list