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!