How to give the variable name of a large dataset to a table

조회 수: 1 (최근 30일)
Sandeep Nair
Sandeep Nair 2021년 4월 19일
댓글: Sandeep Nair 2021년 4월 23일
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

채택된 답변

Walter Roberson
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
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 CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by