[SciPy-User] Scipy.io loadmat/savemat problem
Sun Jun 17 00:39:46 CDT 2012
On Sat, Jun 16, 2012 at 6:46 AM, Peter Eckert <firstname.lastname@example.org> wrote:
> Hello Scipy-Experts,
> I am experiencing a problem with the scipy loadmat/savemat features.
> I have a matfile in mat-5 format which was created in Matlab that I want to manipulate. When I open the existing mat-file with loadmat and directly save the data to a new mat-file with savemat, the new file created actually differs from the original file (it seems to be less compressed). See the screenshots below.
> The new matfile can be read in Matlab without problems, however I actually want to pass the matlab to an executable created with Realtime Workshop with the rtsim option. Starting this with the new matfile creates an error "The values field in the parameters struct is invalid".
> Does anybody has experience with the difference of the savemat option compared to original Matlab matfiles and how I might change it?
I think the difference you see there is due to the lack of default
matrix compression in savemat. You can turn it on with the
``do_compression=True`` flag to savemat. I doubt that's the problem
though. You could also try the ``matlab_compatible`` flag to loadmat,
More information about the SciPy-User