How tor reshape an array

1 次查看(过去 30 天)
%How can I reshape A to obtain B
A=[1 0 1 1 0 1 0 1 0;1 1 0 1 0 1 0 1 1;1 1 0 1 1 1 0 0 0];
B=[1 0 1;1 0 1;0 1 0;1 1 0;1 0 1;0 1 1;1 1 0;1 1 1;0 0 0];

采纳的回答

Matt J
Matt J 2021-8-2
编辑:Matt J 2021-8-2
B=reshape(A.',3,[]).'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by