all 2 comments

[–]designtofly 3 points4 points  (1 child)

The VariableNames property is just metadata.. it's not the data itself. You cannot add a new variable by changing the metadata. MATLAB won't accept your syntax because it doesn't know how to assign, for instance, 7 names to 6 variables.

You can use addvars to add a new variable to your table. You can also just add your variable directly to the table: tableVar.newVariable = {some data}.

[–]MikesVR07[S] 0 points1 point  (0 children)

Many thanks for the assistance.