How to add strings?

6 Ansichten (letzte 30 Tage)
Rohit Deshmukh
Rohit Deshmukh am 23 Okt. 2019
Kommentiert: Rohit Deshmukh am 23 Okt. 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?

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by