You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a simple MAT file (attached) with a single variable with data type MATRIX (14) and array class INT8.
After calling Mat_VarReadInfo on this variable data_type is equal to 0 (MAT_T_UNKNOWN) and after reading data it is equal to 1 (MAT_T_INT8).
Why isn't it equal to MAT_T_MATRIX which, as you can check in a hex editor, is precisely the value stored in the file?
In my opinion it's not a duplicate. The referenced issue focuses on the fact that Mat_ReadVarInfo doesn't read data_type whereas in this issue I show that even after data_type is populated it has incorrect value. So it seems that right now there is no way in matio to get the original data type of a variable (as stored in the file).
What is the purpose of data_type if not to store the raw value of the Data Type field of a data element? (as the values of enum matio_types suggest)?
I understand that for example for a MAT_T_COMPRESSED variable the actual data type after decompressing is different so maybe in that case Mat_ReadVarInfo could assign MAT_T_COMPRESSED to data_type and then Mat_ReadVar could overwrite this field with the actual data type?
I do not know actually as I neither designed or implemented it. One purpose is, that the desired data type and the actual data type can differ. Question is, if the desired data type is respected by the data class already.
Consider a simple MAT file (attached) with a single variable with data type MATRIX (14) and array class INT8.
After calling
Mat_VarReadInfo
on this variabledata_type
is equal to 0 (MAT_T_UNKNOWN
) and after reading data it is equal to 1 (MAT_T_INT8
).Why isn't it equal to
MAT_T_MATRIX
which, as you can check in a hex editor, is precisely the value stored in the file?int8.mat.tar.gz
The text was updated successfully, but these errors were encountered: