How to append a vector to a cell array?
이전 댓글 표시
How do you append a vector to an existing cell array? Each element of the latter contains a vector with double precision. I want to append vectors as new elements in the cell array.
채택된 답변
추가 답변 (1개)
% A cell array of vectors, C:
C = {[1 2 3]; [1 2 3 4 5]; [1; 2; 3; 4; 5; 6]}
% Append a new vector to the end of C:
new_vector = 1:10;
C{end+1} = new_vector
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!