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 ExchangeCreating 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