MATLAB Answers

How to add strings?

6 views (last 30 days)
Rohit Deshmukh
Rohit Deshmukh on 23 Oct 2019
Commented: Rohit Deshmukh on 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?

Accepted Answer

galaxy
galaxy on 23 Oct 2019
C = horzcat(a, b)
  2 Comments
Rohit Deshmukh
Rohit Deshmukh on 23 Oct 2019
Thanks a ton both of you :)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by