horzcat cell array of string
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi Guys, I am a bit buffled, it shouldnt be so hard. I have a cell array of strings, see image below for details. I want to combine the 2 colunms of this cell array into one colunm. i do this:
B=[A{:,1} A{:,2}];
But it combines everything into one unique cell... Help please. Cheers Medie

댓글 수: 0
채택된 답변
추가 답변 (1개)
KSSV
2016년 9월 21일
a1 = {'2016/09/20'} ;
a2 = {'03:16:38'} ;
strcat(a1,a2)
댓글 수: 4
Walter Roberson
2016년 9월 21일
That will not leave the customary space between the parts. The strcat I show will add in the space.
KSSV
2016년 9월 21일
space can be added using: strcat(a1,{' '},a2). I was thinking he wanted to merge them into single.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!