How to give the variable name of a large dataset to a table
1 view (last 30 days)
Show older comments
Sandeep Nair
on 19 Apr 2021
Commented: Sandeep Nair
on 23 Apr 2021
I have an .xlsm file and am storing the text and numbers in separate variable ,now i want to make a table with that such that i can directly input the variable names
into the table from the stored text.Can anyone please help instead of manually typing the variable names,how can i represent it directly in a table
0 Comments
Accepted Answer
Walter Roberson
on 19 Apr 2021
Once you have created the table T (let it default to whatever variable names it wants for the moment), then
T.Properties.VariableNames = NAMES;
where NAMES is either a cell array of character vectors, or else a string() array.
8 Comments
Walter Roberson
on 23 Apr 2021
isvarname() talks about MATLAB variable names, not about what is a valid table() variable name. As of R2019b, most character vectors are valid table() variable names.
More Answers (0)
See Also
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!