How can I change this 3-D array(2000,21,80) to 4-D array(1000,20,21,80)?
1 次查看(过去 30 天)
显示 更早的评论
Hi,all !How can I change one 3-D array(2000,21,80) to 4-D array(1000,20,21,80)?
0 个评论
回答(1 个)
the cyclist
2020-12-25
编辑:the cyclist
2020-12-25
output = reshape(x,[1000,2,21,80]);
where x is your input array.
If that is not what you meant, then you'll need to explain how you want to generate the greater number of elements in the output array.
3 个评论
the cyclist
2020-12-25
You didn't give any information about how you wanted the elements from the input array arranged in the output array. We can't suggest how to do what you want, if you don't tell us.
Walter Roberson
2020-12-25
reshape never changes the order in memory. A column of 2000 would reshape to two adjacent rows of 1000, first 1000 elements of the column then the second 1000.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!