MATLAB: *.mat file size problem

.mat filematrix

Hi, I am currently processing an image using tiled-based approach. I save each tile after it is sampled from image and some features are extracted out of it. The types of features and image size is the same for all tiles but the size of *.mat file for each tile varies considerably going from 200 MB to 133 GB! Does anybody know about where things go wrong?

Best Answer

MATLAB does data compression for -v7 files and in some cases for -v7.3 files. The success of the compression is going to depend upon how much pattern the compressor can find. A matrix of all the same value would compress to much much smaller than a matrix that looked random to the compressor.
In the list you showed, none of the files are over 278 megabytes. Your X_obstrn variable would take 330 megabytes by itself if there were no compression. The conclusion would be that some of your matrices compress well and others do not.