How to add strings?

6 visualizaciones (últimos 30 días)
Rohit Deshmukh
Rohit Deshmukh el 23 de Oct. de 2019
Comentada: Rohit Deshmukh el 23 de Oct. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by