필터 지우기
필터 지우기

can strjoin join columns?

조회 수: 3 (최근 30일)
paul kaam
paul kaam 2015년 2월 7일
답변: Jan 2015년 2월 7일
Hi everyone,
i have difficuty with the follow problem: (probably because iam not that good with Matlab)
say i have this:
AA = horzcat(date(1:2),tijd1(1:2))
AA =
'28-01-2015' '20:11:00'
'28-01-2015' '20:11:15'
i want to get this:
BB = strjoin(AA)
BB=
28-01-2015 20:11:00
28-01-2015 20:11:15
but strjoin gives een error unfortunatly
could you help me out?
many thanks!
Gr Paul

답변 (2개)

Star Strider
Star Strider 2015년 2월 7일
There may be more efficient ways to do what you want, but this works:
BB = cellstr([char(AA(:,1)) repmat(' ', size(AA,1),1) char(AA(:,2))]);

Jan
Jan 2015년 2월 7일
BB = strcat(date(1:2), {' '}, tijd1(1:2))

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by