How to append a new element to a cell object A?
조회 수: 2,109(최근 30일)
표시 이전 댓글
>>A={'a';'b'};
I want to append a new element,say 'c', to A, how could I do?
I would appreciate if you could help me.
댓글 수: 0
채택된 답변
Walter Roberson
2015년 6월 8일
A{end+1} = c;
댓글 수: 6
Pedro Miranda Pinheiro
2021년 9월 14일
Thank you, @Walter Roberson! @Christopher Davis, prepend is used for insertion of an element in the begining of a data structure. Append is the one used for end insertion as mentioned above.
추가 답변(1개)
참고 항목
범주
Find more on Data Type Identification in Help Center and File Exchange
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!