Python Open Mat File
import scipy.io
mat = scipy.io.loadmat('file.mat')
Worrisome Weasel
import scipy.io
mat = scipy.io.loadmat('file.mat')
#!python
#!/usr/bin/env python
from scipy.io import loadmat
x = loadmat('test.mat')
lon = x['lon']
lat = x['lat']
# one-liner to read a single variable
lon = loadmat('test.mat')['lon']
import h5py
with h5py.File('test.mat', 'r') as file:
print(list(file.keys()))
with h5py.File('test.mat', 'r') as file:
a = list(file['a'])