[FieldTrip] not seeing expected effects of filtering
Robin
robince at gmail.com
Fri Apr 26 12:23:45 CEST 2013
Sorry!
Just noticed I had the frequencies quoted! I entered them like that without
noticing as I was entering the other arguments.
It's working correctly now!
On Fri, Apr 26, 2013 at 11:19 AM, Robin <robince at gmail.com> wrote:
> Hello,
>
> 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.
>
> I have a block_data structure which is the result of ft_appenddata with
> several runs.
>
> >> 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
>
> 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?
>
> Cheers
>
> Robin
>
> % 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;
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130426/e33af9be/attachment-0002.html>
More information about the fieldtrip
mailing list