MATLAB: Splitvars for input arguments of type ‘cell’

MATLABmulticoumntable

The following contents are stored in a table, in variable 'tbl',
Multico value
______________
{'1'} {'2'} 1
{'2'} {'3'} 2
{'3'} {'4'} 1
{'4'} {'5'} 2
I am trying to split the contents in `Multico`
multico = splitvars(cell2mat(tbl.Multico));
The following error is obtained. Any suggestions on how to split the contents?
Undefined function 'splitvars' for input arguments of type 'cell'.
Expected result:
Multico_1 Multico_2 value
1 2 1
2 3 2
3 4 1
4 5 2

Best Answer

As per my comment to your other question, it looks like Multico should be a matrix not a cell array.
Regardless of its type, what you want is simply:
newtable = splitvars(yourtable, 'Multico')