[FieldTrip] ft_selectdata

Wong-Barnum, Mona mona at sdsc.edu
Fri Feb 10 21:00:30 CET 2017

Hi Mike:

Thank you for your tip, I tried it but I am still the same eeg data as the filtered frequency data:


Do I still need to do the cfg.frequency setting in the ft_selectdata() call or just the cfg.bpfilter and cfg.bpfreq in the ft_preprocessing() call?

In case it wasn’t clear in my original email, the eeg.mat data has ALREADY been through the ft_preprocessing() in another script.


On Feb 2, 2017, at 12:17 PM, Hall, Michael (Research Student) <hallmbh at aston.ac.uk<mailto:hallmbh at aston.ac.uk>> wrote:

Hi Mona,

The cfg.frequency parameter in ft_selectdata only works on data with a frequency dimension.

Try using the cfg.bpfilter = 'yes'; cfg.bpfreq = [0.1 2]; in ft_preprocessing.

Best wishes,

Get Outlook for Android<https://aka.ms/ghei36>

From: Wong-Barnum, Mona
Sent: Thursday, 2 February, 18:22
Subject: [FieldTrip] ft_selectdata
To: FieldTrip discussion list


I’m trying to do some frequency band filtering on my data using ft_selectdata but it doesn’t seem to be working…the new “filtered” data is the same as the original data.

Here is my code (note the eeg.mat file has been through the ft_preprocessing function):

addpath /path/to/fieldtrip


disp ( 'Reading eeg.mat...' )

data = importdata ( 'eeg.mat' );

disp ( 'Getting low delta band...' )

cfg = [];

cfg.frequency = [0.1 2];

eeg_low_delta = ft_selectdata ( cfg, data );

disp ( 'Saving eeg_low_delta.mat...' );

save eeg_low_delta.mat eeg_low_delta -v7.3;

What am I doing wrong?  All help is appreciated.



    Mona Wong
    Web & Mobile Application Developer
    San Diego Supercomputer Center

    "To handle yourself, use your head;
    to handle others, use your heart."

-- Eleanor Roosevelt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170210/6bce1684/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Subj1EEGChan1.png
Type: image/png
Size: 38154 bytes
Desc: Subj1EEGChan1.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170210/6bce1684/attachment-0002.png>

More information about the fieldtrip mailing list