how to de concatenate in matlab?

we used "hortcat" function for concatenating two matices.we didnot know how to deconcatenate it.please help us.

답변 (1개)

David Young
David Young 2012년 1월 19일

0 개 추천

Use indexing.
a = [1 2 3];
b = [4 5 6];
c = horzcat(a, b); % [EDITED]: horcat->horzcat
anew = c(1:3);
bnew = c(4:6);

댓글 수: 3

Abi Aarthy
Abi Aarthy 2012년 1월 19일
thank you.
Jan
Jan 2012년 1월 19일
Btw. HORZCAT is the same as including the arguments in [ and ], so this:
a = [1, 2, 3]
is equivalent to
a = horzcat(1,2,3)
Glo
Glo 2015년 1월 15일
can this be done in simulink by some block?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2012년 1월 19일

댓글:

Glo
2015년 1월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by