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

Antworten (1)

Jan
Jan am 3 Mai 2016
Bearbeitet: Jan am 6 Mai 2016

0 Stimmen

Str = fileread(FileName);
Str = strrep(Str, '?', 'NaN'); % EDITED, "Str, " inserted
Str = strrep(Str, char(10), ',');
Value = sscanf(Str, '%f,');
Value = reshape(Value, 5, []).';

2 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Tags

Gefragt:

am 3 Mai 2016

Kommentiert:

Jan
am 6 Mai 2016

Community Treasure Hunt

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

Start Hunting!

Translated by