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 CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by