看起来 savemat 正在生成.mat包含中文字符时 MATLAB 无法打开的文件,但loadmat能够:
$ python -c 'from scipy.io import *; savemat("tmp.mat", {"test": "你好"}); print(loadmat("tmp.mat")["test"])' && matlab -nodesktop -r 'load tmp; exit'
['你好']
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
Error using load
Can't read file /home/tmp.mat.
任何想法如何更改savemat以输出 MATLAB 可以打开的内容或更改 MATLAB 设置以便我可以读取文件?