Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Changing the dimensions of a large matrix
1 回表示 (過去 30 日間)
古いコメントを表示
I have some data captured from a sensor by way of microsoft excel, the data is in the form of a 2D array, 900 rows and 15360 columns.
each row actually represents a 2d array in itself, and i need to turn the entire thing from a 2d array into a 3d one.
i.e the array is currently:
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
and needs to be in the format of
1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
16 17 18
I've used the permute funtion to get
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
but when i try and use the reshape function on this array i get the following error - Index exceeds matrix dimensions.
Any help will be greatly appreciated.
0 件のコメント
回答 (1 件)
the cyclist
2014 年 10 月 4 日
編集済み: the cyclist
2014 年 10 月 4 日
Is this what you mean?
permute(reshape(A',[3 2 3]),[2 1 3])
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!