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

3 次查看(过去 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 中查找有关 Multidimensional Arrays 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by