Creating a table for a cell array with cell2table
显示 更早的评论
Hi
Is there a limitation when creating a table from a cell array when the elements on a column don't have the same type ? This is the input cell array as shown in the command line:
tbl_content =
[ 9353] [ 493]
[ 7677] {1x1 cell}
[ 6931] [ 128]
and after conversion with cell2table
tbl = cell2table(tbl_content, 'VariableNames', col_names, ...
'RowNames', row_names);
I get
tbl =
ITALY BELGIUM
_____ _______
01-Jan-2010 00:00:00 9353 [493]
01-Feb-2010 00:00:00 7677 [NaN]
01-Mar-2010 00:00:00 6931 [128]
Why the first column doesn't have brackets for its elements, while the second column has ?
My intention is to put on the second cell of the second column in the cell array a NaN.
thanks Bogdan
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!