[FieldTrip] Averaging trials (ft_timelockanalysis)
Stephen Whitmarsh
stephen.whitmarsh at gmail.com
Thu May 3 10:36:13 CEST 2012
Dear Hamza,
Fieldtrip functions in generally do not work on several different
'sets' of data at the same time.
Call the function you are using (e.g. ft_timelockanalysis) separately
for every set of trials and if you want put the output in a
matrix{1:10} of datastructures (e.g. timelock).
You can easily put it in a loop. Something like this:
for i = 1:10
cfg = [];
cfg.trials = [(i-1)*10+1 : i*10];
yourtimelockdata{i} = ft_function(cfg,yourdata)
end
Hope this helps,
Stephen
On 3 May 2012 10:23, Hamza Fawzi Altakroury (Student)
<hamzaf at sabanciuniv.edu> wrote:
> Hello,
>
> I want to average each 10 trials of 100 trials.
> I don't know what to put in (cfg.trials)
>
> I tried cfg.trials = [1:10; 1:10]; and cfg.trials = [1:10; 11:20];
>
> It does not work?
>
> Note: at the end I want to have a cell of 10 matices, not just one matrix.
>
> Any thoughts?
>
> Best,
>
> --
> Hamza Fawzi Altakroury
> Graduate student - MA
> Faculty of Engineering and Natural Sciences
> Sabancı University
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
More information about the fieldtrip
mailing list