Extracting data from readtable

9 visualizzazioni (ultimi 30 giorni)
Megan Henriksen
Megan Henriksen il 22 Ott 2018
Commentato: madhan ravi il 22 Ott 2018
I am trying to import a csv file into MatLab. I can't use readcsv because the data contains headers and datetime values, and I can't use xlsread because I need to include the leading column and row. I am trying to use readtable, which is including all of the data I need, but I can't seem to get my data out of the table. This is what I'm trying to do on a table M to extract my datetime and specific column values:
t = datetime(M(2:end,1), 'ConvertFrom', 'excel');
y1 = M(2:end,120);
Please let me know where my error is!

Risposte (1)

madhan ravi
madhan ravi il 22 Ott 2018
T = readtable('Mycsv.csv') %correct syntax
  5 Commenti
Jeremy Hughes
Jeremy Hughes il 22 Ott 2018
If you need to extract an individual array (in a table they are the variables) use:
T.VarName
madhan ravi
madhan ravi il 22 Ott 2018
Thanks Jeremy

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by