The link you gave is unrelated to nested tables: the goal there was to (in some way) merge multiple tables into one table.
It is certainly possible to create nested tables:
>> T1 = array2table([1234,567890;1235,123450])
T1 =
Var1 Var2
____ ______
1234 567890
1235 123450
>> T2 = array2table([1234,604799;1235,271828])
T2 =
Var1 Var2
____ ______
1234 604799
1235 271828
>> TP = table(T1,T2)
TP =
T1 T2
___________ ___________
[1x2 table] [1x2 table]
[1x2 table] [1x2 table]
>> TP.T1.Var1
ans =
1234
1235
>> TP.T1.Var2
ans =
567890
123450
"Is there a clean way to do this..."
Not really: accessing the data is more complex, which means more bugs, more time to write and maintain, slower, etc.
"...or is this just not how MATLAB tables are meant to be used?"
Ultimately nested tables are unlikely to be very useful: none of the inbuilt tools for processing table data will work on them.
Best Answer