[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MAT files saved much larger then expected
From: |
Mike Miller |
Subject: |
Re: MAT files saved much larger then expected |
Date: |
Thu, 13 Apr 2017 08:42:54 -0700 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Apr 13, 2017 at 01:05:51 -0700, Mark popov wrote:
> Hi,
>
> I'm accustomed to Matlab, using it for around 12 years, and now started
> using Octave as well.
>
> I've noticed something strange - saving .mat files, might result with much
> higher size than expected.
> For example, saving a .mat file which contains a single struct of ~380
> cells, each one's size of ~1MB, results with an overall file size of 1GB
> (instead of just 380MB).
> The size of the RAM memory actually seems OK, only when writing to the
> hard-drive its size explodes.
> Furthermore, loading it takes considerable amount of time, and it's much
> more efficient to load the same data from distributed 400 different mat
> files.
Did you perhaps forget to include the -mat option? You may have assumed
that would be the default format, but it is not. See "help save".
save file1.mat ## file1.mat is Octave text format
save -mat file2.mat ## file2.mat is Matlab binary format
--
mike