How to separate Variables Names from the Data in Two Different table
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have been able to read my excel file and to create my table using this code:
T = readtable('Data.xlsx','TextType','string');
I would like to separate them in 2 differents tables one with variables names and one with the data
because my list of variable name is very long.
like following:
varnames = ["Var1""Var2"..."VarN"]
data =["BOB" "london" "BIM" "Alfred" "Paris" "BOB" "John" "BOB" "CEF"]
Thanks for your understanding
Have a nice day.
0 个评论
采纳的回答
Star Strider
2021-12-11
Perhaps something like this —
T1 = array2table(randi(99, 10, 5))
T2 = T1;
T2.Properties.VariableNames = {'Alpha','Beta','Gamma','Delta','Epsilon'}
Make appropriate changes to get the desired result.
.
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!