How to open Tonatiuh output .DAT files in MATLAB?
Mostra commenti meno recenti
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 Commenti
Image Analyst
il 27 Gen 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
il 27 Gen 2024
Risposta accettata
Più risposte (1)
Benjamin Thompson
il 27 Gen 2024
0 voti
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
Categorie
Scopri di più su Chemistry in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!