MATLAB: Add a variable to a table

MATLABtable

Suppose I have a table T. I want to add a variable x to T. Please advise the steps.

Best Answer

If your table is named T, and your workspace variable is named k, and you want the new variable in the table to be named k, then it's just
T.k = k