[FieldTrip] quick fieldtrip question

Eelke Spaak eelke.spaak at donders.ru.nl
Mon Sep 26 14:22:56 CEST 2011


Hi Tom,

I'm forwarding my response, and your question, to the FieldTrip
mailing list, so that anyone who in the future might wonder the same
thing will benefit. BTW, if you're not subscribed to the list yet, you
really should (see http://fieldtrip.fcdonders.nl/discussion_list for
instructions).

The easiest way to select channels to remove or retain is by using the
cfg.channel option which is understood by ft_preprocessing:

cfg = [];
cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels
data = ft_preprocessing(cfg, data);

or:

cfg = [];
cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels
data = ft_preprocessing(cfg, data);

For more information, type 'doc ft_channelselection' into Matlab, or
see http://fieldtrip.fcdonders.nl/reference/ft_channelselection .

Hope this helps!

Best,
Eelke


2011/9/26 Marshall, T.R. (Tom) <t.marshall at fcdonders.ru.nl>:
> Hi Eelke,
>
> So I have a very quick question about channel selection in fieldtrip.
>
> I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki...
>
> Hope you can help. Thanks in advance.
> Tom
>
> --
> Tom Marshall, MSc.
> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging
> tel: +31(0)243668487
> email: t.marshall at fcdonders.ru.nl
> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands
> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands
>




More information about the fieldtrip mailing list