Skip to content

Instantly share code, notes, and snippets.

@mattfoster
Created August 11, 2008 14:30
Show Gist options
  • Save mattfoster/4864 to your computer and use it in GitHub Desktop.
Save mattfoster/4864 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from scipy.io import mio
x = mio.loadmat('test.mat')
lon = x['lon']
lat = x['lat']
# one-liner to read a single variable
lon = mio.loadmat('test.mat')['lon']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment