如何将matlab中的mat矩阵文件在python中读取出来

先安装hdf5storage这个包

pip3 install hdf5storage

然后在当前目录下放入要读取的mat文件 

# 将matlab中的mat文件读取出来
import hdf5storage

data = hdf5storage.loadmat('inputWeights.mat')
print(data['inputWeights'])

 

猜你喜欢

转载自blog.csdn.net/m0_56514535/article/details/133385692