How to open Tonatiuh output .DAT files in MATLAB?
Ältere Kommentare anzeigen
Hi, I have output files from Tonatiuh ray-tracing software but I am unable to open this file in any other software. I was wondering if there is any way to open it in MATLAB so that I can perform the analysis that I need.
Any help would be appreciate in this regard. This is a binary output file with a .DAT extension. I am unable to uplaod the file here so I am attaching a One-Drive link if anybody wants to have a look.
2 Kommentare
Image Analyst
am 27 Jan. 2024
You have to know the format of the file. Do you know that? Otherwise it'll just be a big long string of bytes with no meaning behind them.
venu
am 27 Jan. 2024
Akzeptierte Antwort
Weitere Antworten (1)
Benjamin Thompson
am 27 Jan. 2024
0 Stimmen
fid = fopen('yourfilename.dat', 'r');
A = fread(fid, 'uint8=>uint8');
fclose(fid);
Then the data is in A as bytes. If you know more about the file format you can change the arguments to fread in order to make the result in A easier to use.
doc fread
Kategorien
Mehr zu Chemistry finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!