MATLAB: Nested tables with duplicate sub-column names

MATLABtables

I'm trying to create a table that consists of two sub-tables, with different names, each of which is two columns wide. All four sub-columns have the same number of rows. The issue is that the first sub-column in both sub-tables has the same name, and ditto for the second:
—– START —– —– STOP —–
Week Seconds Week Seconds
1234 567890 1234 604799
1235 123450 1235 271828
When I try to nest this into a single table, as shown a few of the examples here, I keep getting "Duplicate table variable name: 'Week'."
Of course I could rename the columns as something like "WeekStart", "SecondsStart", etc. to avoid this, but that's a bit awkward—in that case I'd just make a single four-column table, but would lose the nice grouping in the process. I've tried a few of the examples above, as well as mergevars and splitvars, but no luck so far.
Is there a clean way to do this, or is this just not how MATLAB tables are meant to be used?

Best Answer

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) % create nested table!
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.