convert cell array to matrix
2 次查看(过去 30 天)
显示 更早的评论
I have a cell array of size 544 1 , how can I convert it to a matrix of dimension 151*101 without nan appear in the matrix?
1 个评论
John D'Errico
2014-12-10
Um, magic?
You give us no hint at all what is in those cells. So how can we possibly know how to convert it into an array of totally different size and shape?
采纳的回答
Star Strider
2014-12-10
I doubt if you can.
A matrix of size (151x101) has 15251 elements. Your vector has 544 elements. You have to fill the extra 14707 elements with something, and NaN is probably the best option.
更多回答(0 个)
另请参阅
类别
在 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!