Read and writing dpx files in Matlab