how can I read .dat file
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to read data from .dat file, I use code:
A=fopen('gsmap_rnl.20010101.0.1d.daily.00Z-23Z.v6.5133.0.dat');
tline=fgetl(A)
but the result I receive like that
tline =
'š^Â=öð=Pñç=ʸ“=”Q=.$> ëê>jy‘>r.>•S->]\>Kï*>Êu5>Ʊ/>7>àÌ€>þ;¥>íë=>ëúS>û¡>¸
I think the data is encrypted.
I also try with
A=importdata('gsmap_rnl.20010101.0.1d.daily.00Z-23Z.v6.5133.0.dat');
A.data
but the ans is 5.
How can I read the file?
Thanks.
0 Kommentare
Antworten (1)
Bjorn Gustavsson
am 15 Mai 2019
What is the data format? Do you have a file? Is it reasonably sized? Could you share it?
If you type:
more gsmap_rnl.20010101.0.1d.daily.00Z-23Z.v6.5133.0.dat
at the prompt in your standard shell what does the file look like? Does the file have some sort of header/meta-data? Do you have the format specification?
Does it work to simply use load:
>> load gsmap_rnl.20010101.0.1d.daily.00Z-23Z.v6.5133.0.dat
So many questions!
2 Kommentare
Bjorn Gustavsson
am 15 Mai 2019
more is a unix-command for looking at files.
Apparently your file is in some sort of binary format. For reading such files you need to know the format, or have a function that reads said format. The easiest way to get such a function or information about the file-format is from the people/organization from which you got the file. It might be possible to reverse-engineer the file-format (I'm doubtful about that). But I don't think you will not find anyone here that can do it "just like that" and for free.
HTH
Siehe auch
Kategorien
Mehr zu Downloads finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!