From: Loren Shure on
In article <fvoumt$4b9$1(a)gaudi2.UGent.be>, Kris.DeGussem(a)ugent.be
says...
> rajesh schreef:
> > On May 6, 1:06 pm, Javier Martinez <jmarti...(a)acfr.usyd.edu.au>
> > wrote:
> >> Hello all,
> >>
> >> I am working with a series of variables 100000x130 in size. These variables are processed seperately and saved individually to a common .mat file using the save function with the append option.
> >>
> >> Now, when a series of nine variables are saved individually in this manner, the resulting .mat file is approximately 1.2GB. If saved all at once using save, the resulting matlab file is about 320MB. Compression is turned on and I am using Matlab7. This happens no matter the number of variables saved, be it 2 or 20.
> >>
> >> The line in the m-file that does the appending is as follows:
> >>
> >> save(outname,varname,'-append','-compress','-mat');
> >>
> >> There is no mention in the documentation that files saved with the append option should be larger than those saved without. Is there any way to reduce the size of these files to match those saved 'all at once'?
> >>
> >> Thanks
> >
> > As you are using compression it is quite expected that the file size
> > is less when u save all variables at once.
> > It suggests that all your variables are highly correlated.
> > The compression algorithm works well due to the inter variable
> > redundancy.
>
> Anyone who knows which matlab versions offer this functionality? For example, is
> compression in matlab 7.5 compatible with matlab 6.5?
>

Compression was new in R14, MATLAB 7.0, I believe. Best place to find
the info is in the documentation release notes.

--
Loren
http://blogs.mathworks.com/loren/