Matlab fail to read csv data with csvread()

조회 수: 14 (최근 30일)
kairui wang
kairui wang 2019년 2월 1일
댓글: kairui wang 2019년 2월 1일
I tried using csvread() function to read a csv file to get the data, which is in the same folder as the script.
M = csvread('JumperDataWin_Fixed.csv');
But I got these errors
Error using dlmread (line 122)
The file 'JumperDataWin_Fixed.csv' could not be opened because: Invalid argument
Error in csvread (line 48)
m=dlmread(filename, ',', r, c);
Error in LAB1 (line 8)
M = csvread('JumperDataWin_Fixed.csv');
Could anyone explain what's wrong with my codes?
Thanks!
Updated: attach the file
  댓글 수: 11
Walter Roberson
Walter Roberson 2019년 2월 1일
What shows up if you use
ls
? Perhaps there is not an exact match for the file name.
kairui wang
kairui wang 2019년 2월 1일
I solved it. The reason is that there're some strange symbols in the the name of folder which contains the data. Matlab can't recognize the symbol so it generate a random symbol to replace it. Thank you guys!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by