For example, I have 3 arrays:
a = [a1; a2; a3];
b = [b1; b2; b3];
c = [c1; c2; c3];
and I want to combine them in a way: C = [a1; b1; c1; a2; b2; c2; a3; b3; c3] How can i do this, preferably without using for ? Thanks.

 採用された回答

dpb
dpb 2016 年 5 月 18 日
編集済み: dpb 2016 年 5 月 18 日

1 投票

C=reshape([a b c].',[],1);

1 件のコメント

Nik Zakh
Nik Zakh 2016 年 5 月 18 日
Thanks a lot !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2016 年 5 月 18 日

コメント済み:

2016 年 5 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by