ILNumerics unable to read mat file of -v7 format - ilnumerics

I know ILNumerics handles mat file saved using -v6 or -v7.3 option quite nicely but anyone knows how to make it recognize files saved using -v7 option?
The -v7 option by default uses compression and hence ILNumerics will give me a message saying it does not support compressed file and suggests me using -v6 option to save the file.
I guess nowdays mat file saved using latest releases of matlab (like 2010 - 2014) prefer the -v7 file format against the -v7.3 format which internally uses HDF5 because of the overhead HDF5 causeds. And since compression it's also smaller in size than the -v6 file which also is a big advantage.
So can ILNumerics fill this gap? Or is there already a solution that I missed?
Thanks.

Related

Decrease .mat file size

I have a lot of .txt files with sizes from 100MB to 300MB and I want to transfer all the data that is in them to .mat files. The data is mostly numbers and I am looking to make the storage space as small as possible. Right now what I've done is read the data in the .txt files, put them in a struct and then save it using a v7.3 compression scheme, but each variable then comes out to be almost 9 GB. Would anyone have an idea about how I can make this better ?
You can save to MAT file v7 as noted in the documentation:
Version 7.3 MAT-files use an HDF5 based format that requires some overhead storage to describe the contents of the file. For cell arrays, structure arrays, or other containers that can store heterogeneous data types, Version 7.3 MAT-files are sometimes larger than Version 7 MAT-files.

ArcView (ArcGIS) AVL file format to Matlab mat file format

I have a file that is in AVL file format from a program called ArcGIS (formerly ArcView) that I need to convert to a mat file. It contains data I need to play back. Can anybody suggest a simple way to convert the file? I have done quite a bit of searching, and it seems the AVL is not a binary, aka it is a text format, which means I could write a program to convert it, but only if I also knew the corresponding matlab MAT file format. Moreover, this could take quite a while to do, and I need to file to be converted quickly so I can use the data.

Compression of large figures in .fig format in MATLAB

My MATLAB script generates a figure from a timeseries data that, when saved, is over 200 MB in size. Is there a way to compress the figure to a lesser size in '*.fig' format? The compression has to be lossless so that I can zoom in and view the details in the figure. The figure has to be saved in *.fig format so that the axis property relations between subplots are preserved and I can use the data cursor tool.
The *.fig format cannot be saved as is in compressed form. The format is just not capable of it. But in MATLAB you can use functions zip to compress files created by savefig, and unzip with passing to openfig. This way you can create simple script to load and save zipped figs. Of course you will need to use a temp file, which should be taken care of as well.

Matlab .mat file saving

I have identical code in Matlab, identical data that was analyzed using two different computers. Both are Win 7 64 bit. Both Matlabs are 2014-a version. After the code finishes its run, I save the variables using save command and it outputs .mat file.
Is it possible to have two very different memory sizes for these files? Like one being 170 MB, and the other being 2.4 GB? This is absurd because when I check the variables in matlab they add up to maybe 1.5 GB at most. What can be the reason for this?
Does saving to .mat file compress the variables (still with the regular .mat extension)? I think it does because when I check the individual variables they add up to around 1.5 GB.
So why would one output smaller file size, but the other just so huge?
Mat in recent versions is HDF5, which includes gzip compression. Probably on one pc the default mat format is changed to an old version which does not support compression. Try saving specifying the version, then both PCs should result in the same size.
I found the reason for this based on the following stackoverflow thread: MATLAB: Differences between .mat versions
Apparently one of the computers was using -v7 format which produces much smaller files. - v7.3 just inflates the files significantly. But this is ironical in my opinion since -v7.3 enables saving files larger than 2 GB, which means they will be much much larger when saved in .mat file.
Anyway this link is very useful.
Update:
I implemented the serialization mentioned in the above link, and it increased the file size. In my case the best option will be using -v7 format since it provides the smallest file size, and is also able to save structures and cell arrays that I use a lot.

How do you open .mat files in Octave?

I have a .mat file that I want to open and see its contents. Since I don't have MATLAB, I downloaded GNU's Octave. I'm working on Mac's terminal so I'm not exactly sure how to open the .mat file to see its contents.
How to do this?
Not sure which version of .mat file you might have, or whether Octave keeps up with the latest Matlab formats.
Here's a link that might be a good start.
Bottom line is that you can say: load MyMatFile.mat right at the Octave prompt.
In case you wind up having to write code to read the .mat file ever: I've done this before and it was not difficult, but was time-consuming. Mat file format for 2012a
If your file contains only numbers, no .mat header, then this should work:
variable = load("filename")