How can I loop through a column in a sub tables and convert non-cells to cells?
Show older comments
I have a 33x5 table (Named: Book1), each cell in the 4th column has sub table (Named: SubTable) of size Nx13.
When trying to concatinate all sub tables, I get the error below: "Cannot concatenate the table variable "Atoms" because it is a cell in one table and non-cell in another."
"Atoms" is the 13th column of the sub tables.
How can I loop through and convert all non-cells to cells in all the subtables (specifically from the 13th column)?
NOTE: In the sub tables, the 13th column "Atoms":
-The non-cells use logical have the value of 1 or 0.
-The cells have the value of 'true' or 'false'
Example of the SubTable:

6 Comments
Dyuman Joshi
on 3 Jul 2023
Please attach your data using the paperclip button and show what you have attempted yet.
Rookie Programmer
on 3 Jul 2023
Edited: Rookie Programmer
on 3 Jul 2023
Dyuman Joshi
on 3 Jul 2023
Edited: Dyuman Joshi
on 3 Jul 2023
You did not attach your data. Please attach your data.
And note that True/False are equivalent to 1/0, so the assignments in if-else condition block is redundant.
Or do you want to use the char arrays 'true' and 'false' instead of logical values?
Rookie Programmer
on 3 Jul 2023
Edited: Rookie Programmer
on 3 Jul 2023
Matt J
on 3 Jul 2023
Sorry I cannot attach my data.
Meaning that it is proprietary? Then attach hypothetical data with the same relevant structure.
Rookie Programmer
on 3 Jul 2023
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!