Comma Separated Imported Data
이전 댓글 표시
I have a csv file that is separated by commas without spaces and with will not be separated into multiple variables. Is there something I can do in Matlab? I tried tooling with the delimiter options but to no evail, thank you (I have attached one of the files).
채택된 답변
추가 답변 (1개)
Jan
2018년 6월 13일
Remove the double quotes at first:
S = fileread(FileName);
S(S == '"') = [];
fid = fopen(FileName, 'w');
fwrite(fid, S, 'char');
fclose(fid);
Then the standard tools should word: readtable, csvread, sscanf, textscan.
댓글 수: 2
Cameron Power
2018년 6월 13일
Walter Roberson
2018년 6월 13일
... That is the implementation, other than the fact that you would proceed from there to
T = readtable(FileName);
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!