[FieldTrip] Calculating ERPs with tf_timelockbaseline
Luca Moretti
moretti.l1991 at gmail.com
Tue Apr 9 11:52:07 CEST 2019
Dear Stephen,
yes, I have tried both of the suggested operations, but there is still no
difference between plotting Color_C and plotting ERP.
If I inspect both these variables however, I see that they differ in the
avg field of their structure. Therefore it looks like there might be a
problem with ft_multiplotER. Do you see any error in my script for what
concerns this function?
Thanks again for your answer,
Luca
Il giorno mar 9 apr 2019 alle ore 10:27 Stephen Whitmarsh <
stephen.whitmarsh at gmail.com> ha scritto:
> Dear Luca,
>
> 1) Have you tried not using a baseline correction, just to make sure that
> a baseline correction is applied at all? (if not, that would explain the
> lack of differences between different baselines :-)).
> 2) Have you tried replacing cfg.channel = {'all'}; with cfg.channel =
> 'all';?
>
> HTH,
> Stephen
>
> On Tue, 9 Apr 2019 at 10:13, Luca Moretti <moretti.l1991 at gmail.com> wrote:
>
>> Dear Fieldtrippers,
>>
>> I have a problem concerning the calculation of ERPs with
>> ft_timelockbaseline. After I have preprocessed the data (re-referenced,
>> filtered, cleaned from artifact), this is what I have done:
>>
>> inputfile = (strcat('Subject_2_clean.mat'));
>> load (inputfile);
>> layout = 'easycapM1';
>>
>> %% Calculating ERP
>>
>> cfg = [];
>> cfg.trials = find(data_clean_2.trialinfo==60);
>> Color_C = ft_timelockanalysis(cfg, data_clean_2);
>>
>> %% Plotting
>>
>> cfg = [];
>> cfg.baseline = [-.3 0];
>> cfg.channel = {'all'};
>> cfg.parameter = 'avg';
>> ERP = ft_timelockbaseline(cfg, Color_C);
>>
>> figure
>> cfg = [];
>> cfg.layout = layout;
>> cfg.interactive = 'yes';
>> cfg.showoutline = 'yes';
>> ft_multiplotER(cfg, ERP)
>>
>> %%
>>
>> My problem is that it doesn't matter what kind of baseline period I am
>> chosing, the figure Always turn out the same for each electrode. I have
>> even tried to set the baseline to the Whole trial period, but the figure I
>> get from plotting individual channels from the multiplot is Always the same.
>>
>> Can someone find something wrong with my code?
>>
>> Many thanks!
>> Luca
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190409/dc1ed9ed/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list