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 headerfloat z1float z2float z3and 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
Best Answer