How to add strings?

6 ビュー (過去 30 日間)
Rohit Deshmukh
Rohit Deshmukh 2019 年 10 月 23 日
コメント済み: Rohit Deshmukh 2019 年 10 月 23 日
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?

採用された回答

galaxy
galaxy 2019 年 10 月 23 日
C = horzcat(a, b)
  2 件のコメント
Akira Agata
Akira Agata 2019 年 10 月 23 日
Or simply:
C = [a,b];
Rohit Deshmukh
Rohit Deshmukh 2019 年 10 月 23 日
Thanks a ton both of you :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by