Can anyone please help me to understand the following problem with converting a cell-array to a table?
Show older comments
Hello everybody,
I have created two cell-arrays named test1 and test2, attached in the file testcell.mat.
The ninth cell in both cell-arrays includes a table-array. In test1 this table array has the size [1x18] and in test2 it has the size [5x18]. What I want to do is to convert these cell-arrays to table-arrays via cell2table(). What I am doing:
test1_table=cell2table(test1)
test2_table=cell2table(test2)
Now, I check the class of the ninth column in test1_table and test2_table...
class(test1_table.test19)
class(test2_table.test29)
... and the result is that class(test1_table.test19) is table and class(test2_table.test29) is cell!
Can anyone explain me the different class? Thank you very much!
2 Comments
Which version of MATLAB are you using? Your code/example is working fine on 2017b/Win.
Side note: as far as I am concerned, tables are not at a mature enough stage to be really reliable.. and this may last as long as they are implemented in pure MATLAB because they have all the limitations of MATLAB OOP (especially regarding the overload of indexing methods).
Tobias Klenke
on 8 Oct 2017
Accepted Answer
More Answers (0)
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!