フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I have a matrix of dimension a=[993,1], I need a matrix b=[331,3] such that every 3 columns of the a forms a row of b

1 回表示 (過去 30 日間)
Chris Martin
Chris Martin 2014 年 6 月 3 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
the problem is like a=[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18] and I need b of the following form b=[1 2 3;4 5 6; 7 8 9; 10 11 12; 13 14 15; 16 17 18]

回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 6 月 3 日
Chris, use
b = reshape(a',3,[])'

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by