How to append a new element to a cell object A?
    229 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    fan feng
      
 le 8 Juin 2015
  
    
    
    
    
    Réponse apportée : geofo
      
 le 3 Déc 2021
            >>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 commentaires
Réponse acceptée
  Walter Roberson
      
      
 le 8 Juin 2015
        A{end+1} = c;
6 commentaires
  Christopher Davis
 le 10 Jan 2021
				That's really helpful, not sure if it's proper terminology but I've heard this refered to as prepend
  Pedro Miranda Pinheiro
 le 14 Sep 2021
				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.
Plus de réponses (1)
Voir également
Catégories
				En savoir plus sur Logical dans Help Center et File Exchange
			
	Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!








