Combine of two matrices

2 ビュー (過去 30 日間)
Volkan Yangin
Volkan Yangin 2017 年 5 月 30 日
コメント済み: Volkan Yangin 2017 年 5 月 30 日
Hi everbody I have two matrices like these:
A=[10 12 14 16 18]
B=[1 3 5 7 9]
I should combine two matrices as:
AB=[10 1 12 3 14 7 16 9 18];
What kind of a code must be written for this operation?
Thanks...

採用された回答

Adam
Adam 2017 年 5 月 30 日
編集済み: Adam 2017 年 5 月 30 日
AB = reshape( [A; B], [1 10] )
will give you what I guess you want. What you claim you want doesn't have any obvious logic.
  1 件のコメント
Volkan Yangin
Volkan Yangin 2017 年 5 月 30 日
It works perfectly. Thanks Adam.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by