tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
334 stars 97 forks source link

string array support ? #98

Open Nelson-numerical-software opened 5 years ago

Nelson-numerical-software commented 5 years ago

reading a v7.3 or v6 matfile with A = ["Nelson" "is" "open"] returns MAT_T_UNKNOWN (tested with matio master)

A = ["Matio" "string" "array"]
save('string_array.mat', 'A', '-v7.3')

What are really supported types ? My Soft nelson can have all equivalent variables available in mat file and I would like to use matio...

Thanks

tbeu commented 5 years ago

How and in which MATLAB version did you generate this MAT-file?

Nelson-numerical-software commented 5 years ago

do you support string array ?

tbeu commented 5 years ago

Yes, character array is supported.

Nelson-numerical-software commented 5 years ago

string array != character array since 2016 string is available. It is as a cell of characters https://fr.mathworks.com/help/matlab/ref/string.html support or not ?

tbeu commented 5 years ago

Not yet supported. Let me see what I can do.

Can you save your MAT file also as v7 and v6 please.

Nelson-numerical-software commented 5 years ago
string_array = ["Matio" "will" "support"; "string" missing() "array"] 
save('d:/string_array-v7.3.mat','string_array','-v7.3')
save('d:/string_array-v7.mat','string_array','-v7')
save('d:/string_array-v6.mat','string_array','-v6')
tbeu commented 5 years ago

Related to #77 and the undocumented opaque type for MCOS. At least, we have the reverse engineering available by @mbauman at https://nbviewer.jupyter.org/gist/mbauman/9121961.