[FieldTrip] Averaging trials (ft_timelockanalysis)

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Thu May 3 11:20:23 CEST 2012


Dear Hamza,

Actually, the statistic functions DO accept cellstructures of
datastructures, and what I suggested is therefor very convenient,
especially in that regard.
Please take a look at http://fieldtrip.fcdonders.nl/walkthrough. I
would recommend walking through it from the beginning, but you could
take a particular look at the statistics section. In there I try to
explain the data structure handling in detail which deals with your
question.

Cheers,
Stephen

On 3 May 2012 11:09, Hamza Fawzi Altakroury (Student)
<hamzaf at sabanciuniv.edu> wrote:
> Hello again,
>
> But I need to process my data later by ft_timelockstatistics.
> I don't think this funtion accepts cell containing many structs.
>
> I think its better to do average manually then call ft_lockanalysis, then
> ft_timelockstatistics. Right?
>
> Hamza
>
>
> On Thu, May 3, 2012 at 11:36 AM, Stephen Whitmarsh
> <stephen.whitmarsh at gmail.com> wrote:
>>
>> 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
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
>
> --
> 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