How to give the variable name of a large dataset to a table
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2021-4-19
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 个评论
Walter Roberson
2021-4-23
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!