Extracting data from readtable
이전 댓글 표시
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!
답변 (1개)
madhan ravi
2018년 10월 22일
T = readtable('Mycsv.csv') %correct syntax
댓글 수: 5
Megan Henriksen
2018년 10월 22일
madhan ravi
2018년 10월 22일
Mind uploading the data to test?
Megan Henriksen
2018년 10월 22일
Jeremy Hughes
2018년 10월 22일
If you need to extract an individual array (in a table they are the variables) use:
T.VarName
madhan ravi
2018년 10월 22일
Thanks Jeremy
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!