Info
此问题已关闭。 请重新打开它进行编辑或回答。
Converting a variable sized cell array to a matrix
1 次查看(过去 30 天)
显示 更早的评论
I have a cell as below:
5 -3 11
2 3 7
-9 7
-1 3 2 4
-4
I want to convert this to a matrix. I don't know the maximum columns of the data. That means, given a cell, first I need to split the data and see what is the maximum number of columns and then generate the matrix accordingly.
1 个评论
the cyclist
2020-11-16
编辑:the cyclist
2020-11-16
The way you have written this, it leaves a lot of ambiguity. Is this an accurate definiion for your cell array?
C = {5, -3, 11, [];
2, 3, 7, [];
-9, 7, [], [];
-1, 3, 2, 4;
-4, [], [], []};
If not, can you define it in MATLAB notation, or upload it here in a MAT file?
采纳的回答
Sourabh Kondapaka
2020-11-18
If this is still not clear. Please upload a .mat file of the variable using save() method in matlab.
0 个评论
更多回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!