<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Mike:
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>Thank you for your tip, I tried it but I am still the same eeg data as the filtered frequency data:</div>
<div class=""><br class="">
</div>
<div class=""><img height="413" width="681" apple-width="yes" apple-height="yes" apple-inline="yes" id="06A0A94F-9E0A-4042-95B5-67628D474CCB" src="cid:D3CC2A7D-9410-4738-B599-515649221DF4" class=""></div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>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?</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>In case it wasn’t clear in my original email, the eeg.mat data has ALREADY been through the ft_preprocessing() in another script.</div>
<div class=""><br class="">
</div>
<div class="">Mona</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""> <br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 2, 2017, at 12:17 PM, Hall, Michael (Research Student) <<a href="mailto:hallmbh@aston.ac.uk" class="">hallmbh@aston.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Hi Mona,</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
The cfg.frequency parameter in ft_selectdata only works on data with a frequency dimension.</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Try using the cfg.bpfilter = 'yes'; cfg.bpfreq = [0.1 2]; in ft_preprocessing.</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Best wishes,<br class="">
Mike</p>
<div style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
<br class="webkit-block-placeholder">
</div>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Get <a href="https://aka.ms/ghei36" class="">Outlook for Android</a></p>
<br class="">
<div class=""><br class="webkit-block-placeholder">
</div>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
From: Wong-Barnum, Mona<br class="">
Sent: Thursday, 2 February, 18:22<br class="">
Subject: [FieldTrip] ft_selectdata<br class="">
To: FieldTrip discussion list<br class="">
<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Hi: <br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
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.<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Here is my code (note the eeg.mat file has been through the ft_preprocessing function):<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
addpath /path/to/fieldtrip</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
ft_defaults<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
disp ( 'Reading eeg.mat...' )</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
data = importdata ( 'eeg.mat' );<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
disp ( 'Getting low delta band...' )</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
cfg = [];</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
cfg.frequency = [0.1 2];</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
eeg_low_delta = ft_selectdata ( cfg, data );</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
disp ( 'Saving eeg_low_delta.mat...' );</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
save eeg_low_delta.mat eeg_low_delta -v7.3;<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
What am I doing wrong?  All help is appreciated.<br class="">
</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
thanks,</p>
<p dir="auto" style="text-align: left; margin-top: 25px; margin-bottom: 25px; font-family: sans-serif; font-size: 11pt; background-color: white;" class="">
Mona<br class="">
</p>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
*********************************************<br class="">
    Mona Wong<br class="">
    Web & Mobile Application Developer<br class="">
    San Diego Supercomputer Center<br class="">
<br class="">
    "To handle yourself, use your head;<br class="">
    to handle others, use your heart."</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-tab-span" style="white-space: pre;"></span>-- Eleanor Roosevelt</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
*********************************************</div>
</div>
</div>
<br class="">
</div>
</body>
</html>