问题
I created a 1X20 struct in Matlab. This struct has 9 fields. The struct is saved in -v7.3 version because of its dimensions (about 3 Giga). one of the fields contains 4D matrix, other contain cell arrays, meaning it is a complex struct. I would like to know if there is a way to load this struct into Python?
回答1:
MATLAB v7.3 uses HDF5 storage; scipy.io.loadmat
cannot handle that
MATLAB: Differences between .mat versions
Instead you have to use numpy
plus h5py
How to read a v7.3 mat file via h5py?
how to read Mat v7.3 files in python ?
and a scattering of more recent questions.
Try that, and come back with a new question it you still have problems sorting out the results.
来源:https://stackoverflow.com/questions/44225231/how-to-load-matlabs-struct-saved-with-v7-3-in-python