How to add new row to matrix of variable columns

1 view (last 30 days)
I have a matrix created with multiple column vectors and am looking for a way to add a row vector to the matrix to include the variable names in the matrix. Not sure how to add a row to a column vector matrix.

Accepted Answer

Guillaume on 28 Oct 2019
You can't add variable names to matrices. Matrices can only contain numbers.
However, you could use a table which are designed explicitly for that.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!