Joining/merging several cell arrays

iliya ka asked on 21 Jan 2012
Latest activity: Answer by iliya ka on 27 Jan 2012

Greetings,

I have a number of big cell arrays (~50,0000 x 15) which I would like to join into one , using some key vectoers located in each of the original arrays.

I've tried using the command - newarray= join(data1,data2) and received the following error : " ??? Undefined function or method 'join' for input arguments of type 'cell'."

Thank you time and assistance, Iliya

1 comment

Walter Roberson on 21 Jan 2012

Tags

Products

    2 answers

    David Young answered on 21 Jan 2012

    The standard concatenation brackets work with cell arrays just as with numerical arrays:

     >> cell1 = {'a' 'b' 'c'};
     >> cell2 = {'d' 'e' 'f'};
     >> cell3 = [cell1 cell2]
     cell3 = 
        'a'    'b'    'c'    'd'    'e'    'f'
     >> cell4 = [cell1; cell2]
     cell4 = 
        'a'    'b'    'c'
        'd'    'e'    'f'

    But I don't know what "using some key vectors" means, so maybe it's more complex than this.

    0 comments

    iliya ka answered on 27 Jan 2012

    Thank you both.

    0 comments

    Contact us at files@mathworks.com