Error while trying to import a .csv file. Why? <<Error using readtable (line 216)>> MATLAB

I have this dataset in a csv file data.csv.
When I try to import it it gaves me an error.
data = readtable('data.csv', header = true);
Error using readtable (line 216)
Conversion to cell from char is not possible.
Note: readtable detected the following parameters:
'Delimiter', ',', 'HeaderLines', 0, 'ReadVariableNames', true, 'Format', ''

댓글 수: 1

Matlab uses name-value input passing, not keyword, and the name is 'HeaderLines':
data = readtable('data.csv', 'HeaderLines',1);
this may or may not fix the error

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

질문:

2020년 4월 30일

댓글:

2020년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by