what is the meaning of this code
1 次查看(过去 30 天)
显示 更早的评论
for i=1:1:n
M(:,i)=ca{i}(:);
end
0 个评论
采纳的回答
Walter Roberson
2021-3-20
ca is a cell array. The first n entries of the cell array are to be reshaped into vectors and stored as columns of M. You would get an error if the number of elements in each entry is not the same.
In some cases, the code could be replaced with a call to cell2mat(), depending on what the shape of the entries is.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!