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개)

Jan
Jan 2016년 5월 3일
편집: Jan 2016년 5월 6일
Str = fileread(FileName);
Str = strrep(Str, '?', 'NaN'); % EDITED, "Str, " inserted
Str = strrep(Str, char(10), ',');
Value = sscanf(Str, '%f,');
Value = reshape(Value, 5, []).';

댓글 수: 2

sir,i try this the error occured.the error type is not enough input argument.
Jan
Jan 2016년 5월 6일
Yes, there have been some typos. They are fixed now.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

질문:

2016년 5월 3일

댓글:

Jan
2016년 5월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by