Add a variable to a table

2 views (last 30 days)
alpedhuez
alpedhuez on 5 Jun 2018
Answered: Peter Perkins on 5 Jun 2018
Suppose I have a table T. I want to add a variable x to T. Please advise the steps.

Accepted Answer

Peter Perkins
Peter Perkins on 5 Jun 2018
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

More Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!