Mar 01
Helper functions for reading/writing binary data in Matlab
Matlab, Programming No Comments »A common task in image processing is reading and writing binary data to files. On the Matlab command line it comes in handy to have a set of helper functions that save one from typing duplicate code over and over again, i.e. the fopen(), fwrite()/fread() and fclose() stuff.
I have created two functions writebinary() and readbinary() for that purpose. A primitive session where we save and load the 2-D Shepp-Logan phantom could look like this:
Its not a big deal - but useful!
The latest version can be downloaded at MATLAB Central.





Recent Comments