I'm developing as bachelor thesis a library for IO between C++ linear algebra libraries and Matlab MATfiles. I'm providing support for ublas matrices, both dense (matrix) and sparse (compressed_matrix). My library is not well documented at this moment, but I will release the first stable version before the end of June (with documentation and examples).
It is ready now for every input and output operation, but cannot store data compressed with zlib (however it can correctly read this type of data).

The following code gets an idea on how easy is the usage of my library:

matrix<double> my_matrix(...);
// Fill the matrix...

// Open the file stream (with filename as parameter)
OutputStream os("myfile.mat");

// Put the matrix into a wrapper
BoostDenseOWrapper wrapper(my_matrix);

// Save the matrix (name, wrapper)
os.writeArray("my_matrix", wrapper);

// Close the file
os.close();

If you are interested, I will announce on this mailing list the release, which will coincide with the end of my bachelor thesis. Then, I will open the project and every one will be able to contribute to it.

Andrea Arteaga


> - would you like to be able to load/save from/to other formats(matlab)?
 
oh, that would be perfect, because I guess the most powerful prototyping tool is MATLAB or alike now, to check simple ideas and so.
 
We use NetCDF binary format for that, so I guess 'yes'
 
Everyone in my discipline matlab for all figures, statistics, etc. so this is
essential.  I ended up writing a mediocre version of matlab
compatible ascii storage myself which I would love to throw out.