loadmatfile(..,"-v4", SparseReals) and loadmatfile(..,anyVers, SparseComplex) crash Scilab
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
For a real or complex sparse scalar, vector or matrix of numbers
savematfile() works well for any version (*): The file produced
can be read from Octave in an effective way.
However, in Scilab
* loadmatfile() crashes with any version, for complex numbers
* loadmatfile() crashes with "-v4" for sparse real numbers
This is 100% reproducible.
(*) except that sparse([]) is saved as [].
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
File = TMPDIR + "/tmp.mat";
v = sparse(1:3);
savematfile(File, "-v4", "v")
loadmatfile(File)
File = TMPDIR + "/tmp.mat";
v = sparse(1:3 + (3:5)*%i);
savematfile(File,"-v4","v")
loadmatfile(File)
File = TMPDIR + "/tmp.mat";
v = sparse(1:3 + (3:5)*%i);
savematfile(File,"-v6","v")
loadmatfile(File)
File = TMPDIR + "/tmp.mat";
v = sparse(1:3 + (3:5)*%i);
savematfile(File,"-v7","v")
loadmatfile(File)
File = TMPDIR + "/tmp.mat";
v = sparse(1:3 + (3:5)*%i);
savematfile(File,"-v7.3","v")
loadmatfile(File)