How to use syntax T = readtable(filename) for creating a table from a file?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
phdcomputer Eng
el 26 de Abr. de 2018
Comentada: phdcomputer Eng
el 30 de Abr. de 2018
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 comentarios
Respuesta aceptada
Fangjun Jiang
el 26 de Abr. de 2018
try this
filename='c:\MyDoc\MyFile.xlsx';
T=readtable(filename);
3 comentarios
Fangjun Jiang
el 27 de Abr. de 2018
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Tables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!