How to read the mat matrix file in matlab in python

First install the hdf5storage package

pip3 install hdf5storage

Then put the mat file to be read in the current directory 

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

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

 

Guess you like

Origin blog.csdn.net/m0_56514535/article/details/133385692
Recommended