how to Insert cell array into a cell?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hey guys, i need help inserting a cell array into a cell in another cell array. My problem has the form of this:
%INPUT
A = {'one''two''three'};
B = {'four''five''six'};
B{1,1} = A{1,:}
%WANTED OUTPUT
B = {'one''two''three'},{'five'},{'six'}
I really hope someone can help
댓글 수: 0
채택된 답변
VBBV
2022년 11월 11일
%INPUT
A = {'one''two''three'};
B = {A,'four''five''six'};
댓글 수: 7
Stephen23
2022년 11월 11일
D = 1;
C = num2str(D);
A = {'one',C, 'three'};
B = {{'one'},{'two'},{'three'}};
B{1,1} = A ;
n = 10;
for i = 1:n
D = D+1;
C = num2str(D);
A = {{'one'},{C}, {'three'}};
B{i} = {B,A};
end
B{:}
B{1}
B{1}{1}{:}
B{1}{2}{:}
What exactly do you mean by "lost" ?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Acquisition Using Any Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!