pythoncode in matlab

Carl phleum_nospam at chello.se
Thu May 11 14:53:56 EDT 2006


patrick.d.hull at gmail.com wrote:

> check out PyMat:
> http://claymore.engineer.gvsu.edu/~steriana/Python/pymat.html
> 
> I've never used it but I believe it should work for your needs.
> However, I highly recommend taking a look at SAGE:
> http://modular.math.washington.edu/sage/
> which has an interface to octave.
> 
> -ph
PyMat will not help you! PyMat works the other way around, ie it allows for
Matlab calls from Python.

Basically you need to build a Python extension which includes calls to the
matlab engine (see the Python and Matlab manuals). Another way is to make a
shell call Python directly via "!python -c 'myscript.py'" and possibly save
the results on a file, for further processing by Matlab.

If you know about Scilab (which is a free and very capable Matlab clone,
www.scilab.org) you can take a look at its Matlab-equivalent perl command
(ie a Matlab script that calls perl). You can use this perl command for
building a python command in Matlab.

Carl 



More information about the Python-list mailing list