plotting plv

Nathan Weisz nathanweisz at MAC.COM
Tue Oct 12 17:08:11 CEST 2010


hi akiko,

just via coincidence i had the same issue today.

after calculating ft_connectivityanalysis (i used 'coh' as method), the label field was missing. additionally i had to throw out the reference electrode.

cohsniff.label=freqcsd.label;
cohsniff.label(1)=[];

then plotting worked fine.

good luck,
nathan


On 11.10.2010, at 00:54, Akiko Ikkai wrote:

> Hi,
>
> I'm trying to plot plv between channel pairs that I get from ft_connectivityanalysis.
>
> when I run
> cfg                  = [];
> cfg.xparam           = 'time';
> cfg.yparam           = 'freq';
> cfg.zparam           = 'cohsprctm';  % need to run stat.cohsprctm = stat.plvspctrm;
>                                                  % fixed in the latest version?
> cfg.cohrefchannel    = '1';
> cfg.layout = 'ordered';
> cfg.showlabels       = 'yes';
> cfg.colorbar         = 'yes';
> figure; ft_multiplotTFR(cfg, stat)
>
> I get this error:
> ft_multiplotTFR(cfg, stat)
> ??? Index exceeds matrix dimensions.
>
> Error in ==> ft_multiplotTFR at 242
> datavector = data.(cfg.zparam)(seldat,yidc,xidc);
>
>
> ... I'm guessing the error is something like wrong channel combination or refchannel selection, but not able to locate where the error is coming from (have tried different channel combination). stat.dimord is "chan_chan_freq_time", which might not be formatted appropriately for ft_multiplotTFR...?  Below, I'm attaching the code used to get "stat" (plv).
>
> Any suggestions? Thanks in advance! Akiko
>
>
> %%%%% code for connectivityanalysis %%%%%%
> cfg = [];
> cfg.output ='fourier'; % instead of 'powandcsd'... fixed in the latest version?
> cfg.method          = 'mtmconvol';
> cfg.channel = {'1', '7', '120'}; % contra & unrelated channels to test
> cfg.channelcmb = {'1' '7'; '1' '120'; '7', '120'};
> cfg.keeptrials = 'yes';
> cfg.keeptapers = 'no';
> cfg.toi             = [-.8:.1:2]
> cfg.foi             = [1:0.5:30];
> cfg.taper           = 'hanning';
> cfg.t_ftimwin       = zeros(1,length(cfg.foi));
> cfg.t_ftimwin(:)    = 5./cfg.foi;
> TFR = ft_freqanalysis(cfg, ft_data);
>
> cfg=[];
> cfg.method  = 'plv';
> [stat] = ft_connectivityanalysis(cfg,  TFR);
>
> ---------------------------------------------------------------------------
> You are receiving this message because you are subscribed to
> the  FieldTrip list. The aim of this list is to facilitate the discussion
> between  users of the FieldTrip  toolbox, to share experiences
> and to discuss  new ideas for MEG and EEG analysis.
> See also http://listserv.surfnet.nl/archives/fieldtrip.html
> and http://www.ru.nl/neuroimaging/fieldtrip.
> ---------------------------------------------------------------------------

---------------------------------------------------------------------------
You are receiving this message because you are subscribed to
the  FieldTrip list. The aim of this list is to facilitate the discussion
between  users of the FieldTrip  toolbox, to share experiences
and to discuss  new ideas for MEG and EEG analysis.
See also http://listserv.surfnet.nl/archives/fieldtrip.html
and http://www.ru.nl/neuroimaging/fieldtrip.
---------------------------------------------------------------------------



More information about the fieldtrip mailing list