[FieldTrip] (no subject)
Nakyung Lee
rleese12 at berkeley.edu
Sat Oct 1 21:42:57 CEST 2016
Dear Fieldtrip community,
I've been working on recreating one of the works of my predecessor with
Fieldtrip. However, there's a discrepancy between high gamma signals that
was filtered using Fieldtrip and high gamma signals that was filtered using
other MATLAB functions. More specifically, it seems like there's always
some lag between those two data and I've not been able to remove the lag
entirely even with 'xcorr'.
This is my Fieldtrip code (I used 'fir' here but I got the same problem
with other filter types):
cfg = [];
cfg.continuous = 'yes';
cfg.bpfilter = 'yes';
cfg.bpfreq = [freq_low, freq_high];
cfg.bpfilttype = 'fir';
cfg.hilbert = 'yes';
cfg.N = N;
signal_HG_fieldtrip = ft_preprocessing(cfg, signal);
And this is the MATLAB code:
h = fdesign.bandpass('N,Fst1,Fst2,Ast', N, freq_low/(srate/2),
freq_high/(srate/2),60);
BP = design(h);
bp = filter(BP,signal);
signal_HG_matlab = abs(hilbert(bp));
And those codes result in these:
I've been looking at this for weeks now without coming up with a solution.
Is anybody who had a similar problem and managed to fix it?
Thank you in advance.
Best,
Rachel Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161001/6ef7a070/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scatter.jpg
Type: image/jpeg
Size: 43222 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161001/6ef7a070/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot.jpg
Type: image/jpeg
Size: 14343 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161001/6ef7a070/attachment-0003.jpg>
More information about the fieldtrip
mailing list