How to use syntax T = readtable(filename) for creating a table from a file?
조회 수: 3 (최근 30일)
이전 댓글 표시
I put the excel dataset file (.xlsx) with specific 'filename' in the Matlab projects saving path and then I used this syntax in command window
T = readtable(filename)
the program gives this error:
Undefined function or variable 'filename'
I'll be very grateful if suggest me a soloution
댓글 수: 0
채택된 답변
Fangjun Jiang
2018년 4월 26일
try this
filename='c:\MyDoc\MyFile.xlsx';
T=readtable(filename);
댓글 수: 3
Fangjun Jiang
2018년 4월 27일
I am not sure what do you mean saying "by using counters". Once the table is created, you can reference it by ".",e.g. T.Name, T.Age. See "help table". There is an example data, run the example and check out patients.Age, patients.LastName, etc.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!