Basically if I run "test_write_sparse" with all data types supported by version 4 Matlab files (as taken from "Mat_VarWrite4"), only the file for the "double" type seems to work. All other types produce files that Matlab claims to be corrupted and Octave informs that "subscripts must be either integers 1 to (2^63)-1 or logicals". Said error message suggests some error while writing indexes for the array but I can't find connection between data type and said indexes.
Attached is a file for a "single" data type.
It seems you built matio with --enable-extended-sparse=yes (which is the default and the expected behaviour). Try building with --disable-extended-sparse and you won't be able to create sparse MAT files that MATLAB cannot read.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for response.
Is there any particular reason why it acts like this? I'm mostly interested in knowing why, despite the code looking logical (and the option being there in the first place), it doesn't work. Other write tests seem to handle those data types smoothly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--enable-extended-sparse=yes Enable extended sparse matrix data types not supported in MATLAB. MATLAB only supports double-precision sparse data. With this flag, matio will read sparse data with other types (i.e. single-precision and integer types).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Basically if I run "test_write_sparse" with all data types supported by version 4 Matlab files (as taken from "Mat_VarWrite4"), only the file for the "double" type seems to work. All other types produce files that Matlab claims to be corrupted and Octave informs that "subscripts must be either integers 1 to (2^63)-1 or logicals". Said error message suggests some error while writing indexes for the array but I can't find connection between data type and said indexes.
Attached is a file for a "single" data type.
It seems you built matio with
--enable-extended-sparse=yes
(which is the default and the expected behaviour). Try building with--disable-extended-sparse
and you won't be able to create sparse MAT files that MATLAB cannot read.Thanks for response.
Is there any particular reason why it acts like this? I'm mostly interested in knowing why, despite the code looking logical (and the option being there in the first place), it doesn't work. Other write tests seem to handle those data types smoothly.
Copied from https://github.com/tbeu/matio#222-configure-options
Yea, that would explain it.
Thank you very much.