Could anyone tell me how to vertically concatenate different sizes of matrices into one cell array.
1 次查看(过去 30 天)
显示 更早的评论
Could anyone tell me how to vertically concatenate different sizes of matrices into one cell array.
回答(1 个)
Matt J
2018-1-19
C={matrix1;matrix2;...;matrixN}
3 个评论
Rik
2018-1-19
Use a cell matrix to store the second output of the cluster_rows function. It is a terrible idea to create dozens of different versions of that function. Just store the second output in a cell array and use cell2mat.
Look at the question your colleague asked.
Image Analyst
2018-1-19
ca = cell(numMatrices, 1);
for k = 1 : numMatrices
thisMatrix = ....Some how get it....
ca{k} = thisMatrix;
end
另请参阅
类别
在 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!