mirror of
https://github.com/Estom/notes.git
synced 2026-02-04 11:04:21 +08:00
342 B
342 B
IO
-
loadmat 加载一个MATLAB文件
-
savemat 保存为一个MATLAB文件
-
whosmat 列出MATLAB文件中的变量
import scipy.io as sio
import numpy as np
#Save a mat file
vect = np.arange(10)
sio.savemat('array.mat', {'vect':vect})
#Now Load the File
mat_file_content = sio.loadmat('array.mat')
print (mat_file_content)