Effacer les filtres
Effacer les filtres

How to add strings?

3 vues (au cours des 30 derniers jours)
Rohit Deshmukh
Rohit Deshmukh le 23 Oct 2019
Commenté : Rohit Deshmukh le 23 Oct 2019
Suppose i have two strings a and b
a = {'two' , 'three' , 'four'}
b= {'five','six','seven'}
I want output as C
C= {'two','three','four','five','six','seven'}
I tried using strvact and strcat but it doesn't work. What should be used to get c in terms of and b?

Réponse acceptée

galaxy
galaxy le 23 Oct 2019
C = horzcat(a, b)
  2 commentaires
Akira Agata
Akira Agata le 23 Oct 2019
Or simply:
C = [a,b];
Rohit Deshmukh
Rohit Deshmukh le 23 Oct 2019
Thanks a ton both of you :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by