Parse a binary file with different number formats
Mostra commenti meno recenti
Hi, I have a binary file representing a surface, there is a header which provides some info about the surface like sampling rates along x and y axis, number of rows and columns and so on... then there is a series of values which represent values along z axis.
The header is made of short, long and float number formats while z values are in floats. An example can be this:
\\ HEADER:
-float (type of figure)
-long (number of rows)
-long (number of columns)
-float (x sampling rate)
-float (y sampling rate)
-float (x origin)
-float (y origin)
...... //end of header
float z1
float z2
float z3
and so on
How can I retrieve all the values scanning the file? I tried with fread but I don't know which format option choose
Thanks
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Surfaces, Volumes, and Polygons 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!