Why doesn't csvread read properly?
이전 댓글 표시
Hello,
I'm using csvread() to read my stored data from oscilloscope. Original file is 5000 rows long, but when I read .csv file it only reads to half of the file and every second value is 0. In the end vector is still 5000 row long but it's only half of the original. Why it does that and should I rather use textscan()?
댓글 수: 3
>> M = csvread('U_I_MS.csv');
>> size(M)
ans =
5001 3
>> M(1:5,:)
ans =
0.00000 0.00000 0.00000
0.00000 6.00313 60.00390
0.00048 55.20310 20.50390
0.00096 65.60310 29.00390
0.00144 25.60310 2.50391
Two questions:
- What version of MATLAB are you using?
- Why does the CSV file have semicolons at the end of each line?
Niko
2017년 7월 20일
채택된 답변
추가 답변 (1개)
Kaelasha Tyler
2018년 3월 17일
0 개 추천
I have had exactly the same problem as Niko. While it is possible to manually import the file as Jan says, it would be nice to know why the csvread command is not working as it should, and what to do about it. Any further suggestions, much appreciated.
카테고리
도움말 센터 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!