combine elements of cell arrays

조회 수: 1 (최근 30일)
lucksBi
lucksBi 2017년 4월 13일
댓글: lucksBi 2017년 4월 13일
i want 2 know that how can i combine elements of cell arrays in new cell array. e.g elements of a{1,1}{1,1} b{1,1}{1,1} c{1,1}{1,1} are shown on same row of new cell array.

채택된 답변

Philip G
Philip G 2017년 4월 13일
You might try the MATLAB functions horzcat and vertcat. For example:
a{1,1}{1,1}=123;
b{1,1}{1,1}=123;
horzcat(a{1,1}{1,1},b{1,1}{1,1}) % this gives you the cell content in one row
horzcat(a{1,1},b{1,1}) % this gives you a cell array of one row
Hope this helps somehow ;)
  댓글 수: 1
lucksBi
lucksBi 2017년 4월 13일
yea i hv realized that right after posting question. thanks Alot :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by