def read_data_file(filename) to read mat data in python code example Example: open mat python from mat4py import loadmat data = loadmat('datafile.mat')