How tor reshape an array

3 ビュー (過去 30 日間)
Molepo Alfred
Molepo Alfred 2021 年 8 月 2 日
編集済み: Matt J 2021 年 8 月 2 日
%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 Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by