MATLAB: How to assign a variable name to each column of a table composed by only one matrix

variables names table

I have a matrix that I can`t divide in vectors one by one (because it has 130 columns). For exemple, if I have:
A = [1 2 3; 4 5 6;]
I would create a table with different names for each column 1, 2 and 3, like:
Name1 Name2 Name3
_____ _____ _____
1 2 3
4 5 6
How can I do it? Thanks!

Best Answer

array2table(A, 'VariableNames', {'Name1', 'Name2', 'Name3'})
See the doc