Bug#556652: octave can't load files created by libmatio
Bas Zoetekouw
bas at debian.org
Tue Nov 17 21:39:33 UTC 2009
Hi Sylvestre!
You wrote:
> It is not an octave bug. I just tried with Scilab and it causes a
> problem with Scilab too.
Ah! Here's a bit more concise test case, which write only 1 integer:
#include <matio.h>
int main()
{
mat_t * mat = Mat_Open( "foo.mat", 0 );
if ( mat==NULL ) abort();
int dims[2] = {1,1};
int i = 42;
matvar_t * matvar = Mat_VarCreate( "test", MAT_C_INT16, MAT_T_INT16,
2, dims, &i, 0 );
#if 1
/* writes broken file */
Mat_VarWrite( mat, matvar, COMPRESSION_ZLIB );
#else
/* writes working file */
Mat_VarWrite( mat, matvar, 0 );
#endif
Mat_Close( mat );
return 0;
}
Attached are the output file from this program (foo.mat) and the fiel as
matlab itself saves it, generated by:
> load('foo.mat');
> save('foo_matlab.mat','test')
in Matlab 2009b.
Note that the file are 1 byte different in length.
Hope this helps!
Kind regards,
Bas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.mat
Type: application/octet-stream
Size: 178 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20091117/9c40aaca/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo_matlab.mat
Type: application/octet-stream
Size: 177 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20091117/9c40aaca/attachment-0003.obj>
More information about the debian-science-maintainers
mailing list