Plotting a .dat file

7 Ansichten (letzte 30 Tage)
John Smith
John Smith am 17 Okt. 2015
Beantwortet: Martin Schätz am 17 Okt. 2015
I was looking for signal databases which I can plot using MATLAB. Some of the file were in .txt format, which I plotted without any problem. There are other sites which provide the files in .dat format (binary format?). How can I plot there files please? The load function is not working.
Thanks in advance.

Antworten (1)

Martin Schätz
Martin Schätz am 17 Okt. 2015
Hi, if it is really binary fromat, you need at first know with what precission were the data saved (double, uint8, etc...) and idealy how many of them are in your file.
Then you can use script like this:
fileID = fopen('myBinaryImage','r'); % open file for reading
im0 = fread(fileID,[800 600],'uint16'); % read 800x600 array of uint16 data
fclose(fileID); % close reading
I use this for reading of images saved in binary file. For more info follow fopen fclose and fread help.

Kategorien

Mehr zu EEG/MEG/ECoG 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!

Translated by