reshaping cell containing double arrays
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have (as an example) the following cell array:
test =
1×4 cell array
[40×1 double] [40×1 double] [40×1 double] [40×1 double]
I want test to be a 1 x 1 cell, containing the double arrays (from left to right) as one double array of dimension 160 x 1. reshape(test,[160,1]) does not work directly here. What can I do?
0 个评论
回答(3 个)
Guillaume
2017-10-10
That's because what you want is not reshaping but a concatenation. (The matrices may not be contiguous in memory):
test = [test{:}]
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!