[FieldTrip] Problem in creating cell array for within-analysis

KatrinH Heimann katrinheimann at gmail.com
Thu Aug 14 12:19:39 CEST 2014


Thanks Eelke and Nick, that worked of course :)
k


2014-08-14 8:56 GMT+02:00 Nicholas A. Peatfield <nick.peatfield at gmail.com>:

> Dear Katrin,
>
> The problem I can see here is that you are not indexing the data like you
> should with a cell. For that you have to use the curly brackets, for
> example:
>
> load ('ERP_AnnaLisa13obs90_ERP.mat')
>
> all90{1} = obs90_data_ERP
>
> load ('ERP_Benedetta23obs90_ERP.mat')
>
> all90{2} = obs90_data_ERP
>
> Cheers,
>
> Nick
>
>
> On 14 August 2014 08:25, KatrinH Heimann <katrinheimann at gmail.com> wrote:
>
>> Dear all,
>> I am sorry I have another silly problem. I try to create the cell array
>> for a within-analysis.
>>
>> I am using the following code to load the single subject structs and put
>> them in an array calles all90.
>>
>> load ('ERP_AnnaLisa13obs90_ERP.mat')
>>
>> all90(1,:) = obs90_data_ERP
>>
>> load ('ERP_Benedetta23obs90_ERP.mat')
>>
>> all90(2,:) = obs90_data_ERP
>>
>> Unfortunately the result is a struct array. I can convert it to a cell by
>> struct2cell but then fieldtrip does not recognise it as ERP data anymore as
>> the labels inside of the struct disappear. Anybody who can help?
>>  k
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
>
> --
> Nicholas Peatfield, PhD
> Centro Interdipartimentale Mente/Cervello- CIMEC
> <http://www5.unitn.it/People/it/Web/Struttura/STO0008663>
> Assegnista di ricerca - Research Fellow
> Via delle Regole, 101 - 38060 Mattarello
> +39 0461 283086
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140814/16df4eeb/attachment-0002.html>


More information about the fieldtrip mailing list