Python + Matlab = true

A Python module, pymat, enables communication with Matlab:
from numpy import *
import pymat

x = linspace(0, 4*math.pi, 11)
m = pymat.open()
# can send numpy arrays to Matlab:
pymat.put(m, 'x', x);
pymat.eval(m, 'y = sin(x)')
pymat.eval(m, 'plot(x,y)')
# get a new numpy array back:
y = pymat.get(m, 'y')

previousnexttable of contents