Mixing and merge two vectors

3 ビュー (過去 30 日間)
Lila wagou
Lila wagou 2017 年 5 月 23 日
回答済み: Star Strider 2017 年 5 月 23 日
Dear all, i want to mix and merge two vector in a one,
A = [1 2 3 4];
B = [5 6 7 8];
to get
C = [1 5 2 6 3 7 4 8];
Thanks in advance

採用された回答

Star Strider
Star Strider 2017 年 5 月 23 日
This works:
A = [1 2 3 4];
B = [5 6 7 8];
C = reshape([A; B], [], 1)';
C =
1 5 2 6 3 7 4 8

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by