[FieldTrip] Error in ft_mvaranalysis

Manuela Costa manuela.costa at ctb.upm.es
Tue Sep 4 10:42:18 CEST 2018


Dear Jan-Mathijs,

thank you very much for fixing the typo in the code.
I do not get anymore the same error but as you predicted I get a new one.
I hope you can help me with that as well.

Best wishes
Manuela


Matrix dimensions must agree.

Error in ft_mvaranalysis>catnan (line 607)
    datamatrix(:,begsmp:endsmp) =
datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:);

Error in ft_mvaranalysis (line 425)
dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar);

Error in Step2_Calculate_Granger_time_freq_updated_MC (line 124)
    mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,
preprocessing_emotional_Rem_ds{subj});


I copy here the information about the structure (it's the same as before)

The data is downsampled at 250 Hz. The fields of my data structure are
fsample, trial, time, label and cfg. The size of
preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data
points).

Configuration structure:



cfg = [];

    cfg.toolbox = 'bsmart';

    cfg.order   = 10;

    cfg.toi       = -0.5:0.01:3; %% the time points at which the windows
are centered

    cfg.t_ftimwin = 0.25; %% length of time window in second

    mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,
preprocessing_emotional_Rem_ds{subj});


2018-08-31 11:32 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl>:

> Dear Manuela,
>
> This looks like a typo in the code, which I will fix (and once fixed will
> become available in the daily release version of the code). To give myself
> some time: probably not tonight, but perhaps after the weekend :). However,
> the fact that this part of the code clearly doesn’t work, I am not entirely
> sure whether the rest will work smoothly as well, as soon as the current
> hurdle is fixed. But let’s see
>
> Best wishes,
> Jan-Mathijs
>
>
> On 29 Aug 2018, at 13:34, Manuela Costa <manuela.costa at ctb.upm.es> wrote:
>
> Dear community,
>
>
> I'm planning to do granger causality analysis on human iEEG data. I'm
> using ft_mvaranalysis to get time-dependent coefficient sets based on a
> sliding window, but I get an error.
>
> The data is downsampled at 250 Hz. The fields of my data structure are
> fsample, trial, time, label and cfg. The size of
> preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data
> points). Below is the configuration structure and the error message. The
> ft_mvaranalysis function works if I do not use the sliding window approach.
> I tried to use different cfg.toi and cfg.t_ftimwin but I could not find a
> solution. I hope you can help me.
>
>
> Best wishes,
>
>
> Manuela Costa
>
>
> Configuration structure:
>
>
> cfg = [];
>     cfg.toolbox = 'bsmart';
>     cfg.order   = 10;
>     cfg.toi       = -0.5:0.01:3; %% the time points at which the windows
> are centered
>     cfg.t_ftimwin = 0.25; %% length of time window in second
>     mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,
> preprocessing_emotional_Rem_ds{subj});
>
>
>
>
>
>
>
> Error message:
>
>
>
>
> Matrix dimensions must agree.
>
>
> Error in ft_mvaranalysis (line 185)
> latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5];
>
>
> Error in Step2_Calculate_Granger_time_freq(line 108)
>     mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,preprocess
> ing_emotional_Rem_ds{subj});
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180904/d6ae571b/attachment.html>


More information about the fieldtrip mailing list