<div style="font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;color:rgb(34,34,34);background-color:rgb(255,255,255);border:medium none;line-height:1.2" class="markdown-here-wrapper" id="markdown-here-wrapper-827915">
<p style="margin:1em 0px">Hello,</p>
<p style="margin:1em 0px">I am having a problem with simple low-pass filtering where I am not seeing the results I would expect. I am using SVN r8075.</p>
<p style="margin:1em 0px">I have a block_data structure which is the result of ft_appenddata with several runs.</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px 3px 3px 3px;display:inline;white-space:pre;border-radius:3px 3px 3px 3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)">>> block_data

block_data = 

           hdr: [1x1 struct]
         label: {234x1 cell}
       fsample: 508.6300
         trial: {1x1265 cell}
          time: {1x1265 cell}
     trialinfo: [1265x1 double]
            cfg: [1x1 struct]
    sampleinfo: [1265x2 double]

>> size(block_data.trial{1})

ans =

   234   560</code></pre>
<p style="margin:1em 0px">I  then run the following script to lpfilter with two different cut offs  and plot the results which are attached. The output of the filter seems  to be the same whatever I set lpfreq to (but it is definitely doing  something). Am I do something wrong? </p>

<p style="margin:1em 0px">Cheers</p>
<p style="margin:1em 0px">Robin</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px 3px 3px 3px;display:inline;white-space:pre;border-radius:3px 3px 3px 3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)">% Filtering test
% filter
cfg = [];
cfg.lpfilter = 'yes';
cfg.lpfreq = '5';
cfg.lpfilttype = 'but';
cfg.lpfiltord = 3;
flt_data_5 = ft_preprocessing(cfg, block_data);


cfg = [];
cfg.lpfilter = 'yes';
cfg.lpfreq = '70';
cfg.lpfilttype = 'but';
cfg.lpfiltord = 3;
flt_data_70 = ft_preprocessing(cfg, block_data);

%%
figure
subplot(131)
 trl = 100;
chan = 200;
plot(block_data.time{trl}, block_data.trial{trl}(chan,:));
title('Raw Data'); axis tight;
subplot(132)
plot(flt_data_5.time{trl}, flt_data_5.trial{trl}(chan,:));
title('5Hz low pass'); axis tight;
 subplot(133)
plot(flt_data_70.time{trl}, flt_data_70.trial{trl}(chan,:));
title('70Hz low pass'); axis tight;</code></pre>
</div>