put two matrices in one matrix, one will take the odd column and the other one take the even column.

조회 수: 4 (최근 30일)
A is a matrix 4x5
B is a matrix 4x5
C=[A B] 4x10 .. A and B will be combined in a matrix C where A take the odd column and B take the even column

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2021년 12월 16일
C=reshape([A;B],size(A,1),[])

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by