Can I import this CSV file into Matlab?
조회 수: 1 (최근 30일)
이전 댓글 표시
This is the CSV file I have got however it opens through excel and won't import into Matlab using csvread function.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161661/image.png)
How would I import this?
댓글 수: 0
채택된 답변
per isakson
2014년 4월 24일
편집: per isakson
2014년 4월 24일
댓글 수: 2
per isakson
2014년 4월 24일
편집: per isakson
2014년 4월 24일
M = csvread(filename)
reads a comma-separated value formatted file, filename. The file can only contain numeric values.
That might explain why you failed with xlsread. Did you try specifying row,col? Doc says
M = csvread(filename,row,col)
reads data from the file starting at the specified row and column. The row and column arguments are zero based, so that row = 0 and col = 0 specify the first value in the file.
추가 답변 (1개)
Image Analyst
2014년 4월 24일
편집: Image Analyst
2014년 4월 24일
Use readtable():
t = readtable('trial01.csv', 'headerlines', 3);
Or if you have an old version of MATLAB, use dlmread.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!