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

Eelke Spaak eelke.spaak at donders.ru.nl
Thu Aug 14 08:54:41 CEST 2014


Hi Katrin,

Try using curly braces {} to index your cell arrays when you want to
access or change their content. The parentheses index the elements of
the cell array (which are themselves cells, just like elements of
double arrays are doubles). Curly braces index the *contents* of these
cells.

The following blog post might be helpful for you:
http://blogs.mathworks.com/loren/2006/06/21/cell-arrays-and-their-contents/
.

Best,
Eelke

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



More information about the fieldtrip mailing list