Joining/merging several cell arrays

조회 수: 7 (최근 30일)
iliya ka
iliya ka 2012년 1월 21일
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
Walter Roberson
Walter Roberson 2012년 1월 21일
join() only applies to datasets. http://www.mathworks.com/help/toolbox/stats/dataset.join.html

댓글을 달려면 로그인하십시오.

답변 (2개)

David Young
David Young 2012년 1월 21일
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.

iliya ka
iliya ka 2012년 1월 27일
Thank you both.

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by