Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!plix.pl!newsfeed1.plix.pl!news.nask.pl!news.nask.org.pl!news.cyf-kr.edu.pl!agh.edu.pl!news.agh.edu.pl!polsl.pl!not-for-mail From: Adam Przybyla Newsgroups: comp.lang.python Subject: Re: Call python function from Matlab Date: Wed, 8 Jun 2011 07:19:58 +0000 (UTC) Organization: Politechnika Slaska, Gliwice Lines: 16 Sender: Adam Przybyla Message-ID: References: <659556b7-bd7d-415e-919e-e5e8260b6f70@j28g2000vbp.googlegroups.com> NNTP-Posting-Host: smtp.ertel.com.pl X-Trace: polsl.pl 1307517598 13854 62.182.231.178 (8 Jun 2011 07:19:58 GMT) X-Complaints-To: news@polsl.pl NNTP-Posting-Date: Wed, 8 Jun 2011 07:19:58 +0000 (UTC) User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/2.6.18-194.8.1.el5xen (i686)) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7217 nazmul.islam@gmail.com wrote: > I need to call a python function from a Matlab environment. Is it > possible? > > Let's assume, I have the following python code: > > def squared(x): > y = x * x > return y > > I want to call squared(3) from Matlab workspace/code and get 9. > > Thanks for your feedback. ... try this: http://pypi.python.org/pypi/pymatlab Regards Adam Przybyla