how to read .data format data using matlab code??
이전 댓글 표시
for example the file contains 4,43,1,1,?,1 this type format.i attached data file.please help how to read the data file
답변 (1개)
Str = fileread(FileName);
Str = strrep(Str, '?', 'NaN'); % EDITED, "Str, " inserted
Str = strrep(Str, char(10), ',');
Value = sscanf(Str, '%f,');
Value = reshape(Value, 5, []).';
댓글 수: 2
Gayathri varu
2016년 5월 4일
Jan
2016년 5월 6일
Yes, there have been some typos. They are fixed now.
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!