MATLAB: Unstack warnings about variable names

unstack

I ran
unstack
and got
Warning: Table variable names that were not valid MATLAB identifiers have been modified. Since table variable names must be unique, any table variable names that happened to match the new identifiers also have been modified.
To use the original INDVAR values as table variable names, set 'VariableNamingRule' to 'preserve'.
What does it mean?

Best Answer

Just what is says... :)
Your table (or timetable) contained data values that were not valid to be used as MATLAB variable names (that means NOT beginning w/ number, having embedded blanks, etc., etc.,...) Prior to R2019b (I believe was the introduction) table variable names had to follow same rules as "real" variables.
You either must upgrade to get the new functionality or accept the modified names or change them to something you like better than the machine-generated ones.
Also, if there are duplicated values, that's a no-no -- cannot have two columns with the same variable name--and that rule hasn't gone away and can't go away.
Since we don't have a klew what your data looked like, that's about the best we can do on specifics...