How to append a new element to a cell object A?
    조회 수: 222 (최근 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
  Christopher Davis
 2021년 1월 10일
				That's really helpful, not sure if it's proper terminology but I've heard this refered to as prepend
  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개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
			
	제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!








