error using textscan with csv files
조회 수: 2 (최근 30일)
이전 댓글 표시
I have been given a code to process some data in a csv file. When I run this I get the error below. Can anybody help?
fid = fopen('time.csv');
out = textscan(fid,'%s %f %f %s','delimiter',',','headerlines',1);
fclose(fid);
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
댓글 수: 0
답변 (1개)
Walter Roberson
2022년 2월 16일
The fopen failed. The file does not exist in the matlab path, or you do not have permission. if you used the two-output form of fopen you would get a message about why it failed.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!