use the mat2cell function
8 次查看(过去 30 天)
显示 更早的评论
Now i have a 5*100 matrix, how to convert it to a 5*10 cell and each cell contain 1*10?
0 个评论
回答(2 个)
Star Strider
2021-3-23
Try this:
A = randi(9, 5, 100); % Create Matrix To Test Code
C = mat2cell(A, ones(5,1), ones(1,10)*10) % Desired Result
.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!