[FieldTrip] ft_selectdata

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Fri Oct 1 15:20:33 CEST 2021


Dear Eva,

I think you might be using ft_selectdata wrongly, although I would need to
see the cfg's you are using to be sure;

Something like this might work:
cfg = [];
cfg.channel = EEG_chan;
data2 = ft_selectdata(cfg, data);

Cheers,
Stephen



Op vr 1 okt. 2021 om 14:57 schreef Eva Schlösser via fieldtrip <
fieldtrip at science.ru.nl>:

> Hi,
>
>
> Hope you are doing well.
>
>
> I am trying to select all the data with the label EEG from my channels
> from my .edf file and filter the other channels out (such as
> bloodpressure).  I tried to use to edf2fieldtrip function and then only
> select the channels which were needed.
>
>
> data                 = edf2fieldtrip('myfile.edf');
> EEG_chan       = ft_channelselection({'EEG*'}, data.label);
>
> I only want to use the EEG channels, however if I use ft_selectdata it
> only works if I use the whole data file and not the EEG_chan file. I think
> the problem lies in that the EEG channels aren't a 'struct'
>
> -
>
> data             = ft_selectdata(cfg, data); (works)
>
>
>
> data2           = ft_selectdata(cfg, EEG_chan; (does not work)
>
>
>
> Hope you can help me,
>
> Kind regards,
> Eva
>
> _______________________________________________
> 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/20211001/4398af0d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 11087 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211001/4398af0d/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 6003 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211001/4398af0d/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 5848 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211001/4398af0d/attachment-0002.png>


More information about the fieldtrip mailing list