What is a good way to combine strings (of varying length) that are stored in cell arrays?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
John Jendzurski
le 31 Mar 2014
Commenté : John Jendzurski
le 31 Mar 2014
Suppose I have the following variables A and B (both 3x1 cell arrays) as follows.
A = {'A'; 'AB'; 'ABC'}; B = {'1'; '12'; '123'};
How can I create the new variable C (also a 3x1 cell array) as shown below?
C =
'A1'
'AB12'
'ABC123'
I have looked into various functions like strjoin(), but nothing has been apparent.
Thanks!
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Characters and Strings 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!