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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by