how to de concatenate in matlab?

6 views (last 30 days)
Abi Aarthy
Abi Aarthy on 19 Jan 2012
Commented: Glo on 15 Jan 2015
we used "hortcat" function for concatenating two matices.we didnot know how to deconcatenate it.please help us.

Answers (1)

David Young
David Young on 19 Jan 2012
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 Comments
Jan
Jan on 19 Jan 2012
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 on 15 Jan 2015
can this be done in simulink by some block?

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!