pythoncode in matlab

S

Sven Jerzembeck

Hello guys,
is there any possibiliy using Phython code in Matlab. I couldnt find
any helpful stuff. Its not graphical stuff I am doing just
calculations with arrays and strings.

Thanks for answering in advance

Sven
 
C

Carl

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
 
P

patrick.d.hull

PyMat will not help you! PyMat works the other way around, ie it
allows for Matlab calls from Python.

excuse my ignorance: but why would that not be helpful? I may be
missing something blindingly stupid (very possible) but it seems to me
using PyMat would be just as powerful (if not more) as building
extensions...

-ph
 
?

=?ISO-8859-15?Q?Daniel_Kl=FCnder?=

Hi Sven,

I don't have Matlab on my computer so the following is just a wild guess:

As far as I know you can include C code into Matlab or at least into
Simulink. Maybe you could try to execute your Python script in that C code?

Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,297
Messages
2,571,529
Members
48,241
Latest member
PorterShor

Latest Threads

Top