1#!python
2#!/usr/bin/env python
3from scipy.io import loadmat
4x = loadmat('test.mat')
5lon = x['lon']
6lat = x['lat']
7# one-liner to read a single variable
8lon = loadmat('test.mat')['lon']
9
1import h5py
2with h5py.File('test.mat', 'r') as file:
3 print(list(file.keys()))
4