473,605 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calling matlab

Hi;

Does anyone know if we can call matlab for a python or bash script while
feeding the matlab script some command line arguments? I have an
interactive matlab script which i want to automate by feeding the args
from a script.

I know this is probably more suitable to a matlab group but any ideas will
be appreciated.

thanks
moe smadi

Oct 12 '05 #1
3 3995
There is a module named pymat avvailable from
http://sourceforge.net/projects/pymat that provides a limited set of
functions for intertfacing Python to Matlab. The functions are:
open for opening a Matlab session
close for closing a Matlab session
eval for evaluating a Matlab command
put for sending a matrix to Matlab
get for getting a matrix from Matlab

Mohammed, you might want to look at this module to see if it has the
functionality you need.

Howard

Mohammed Smadi wrote:
Hi;

Does anyone know if we can call matlab for a python or bash script while
feeding the matlab script some command line arguments? I have an
interactive matlab script which i want to automate by feeding the args
from a script.

I know this is probably more suitable to a matlab group but any ideas will
be appreciated.

thanks
moe smadi


Oct 12 '05 #2
"Mohammed Smadi" <sm*****@grads. ece.mcmaster.ca > wrote in message
news:ma******** *************** **************@ python.org...
Hi;

Does anyone know if we can call matlab for a python or bash script while
feeding the matlab script some command line arguments? I have an
interactive matlab script which i want to automate by feeding the args
from a script.

I know this is probably more suitable to a matlab group but any ideas will
be appreciated.

thanks
moe smadi

Mohammed -

I worked through this a while back, and posted my solution at
http://www.geocities.com/ptmcg/pytho...om_python.html.

Best of luck,
-- Paul
Oct 12 '05 #3

"hrh1818" <ho******@weste rncom.net> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
There is a module named pymat avvailable from
http://sourceforge.net/projects/pymat that provides a limited set of
functions for intertfacing Python to Matlab.


I think that pymat was superceded by mlabwrap
http://mlabwrap.sourceforge.net/

Alan Isaac
Oct 25 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1407
by: Paul McGuire | last post by:
I've spent the past day or so working through the various complexities in calling Matlab routines from Python (please do not reply with suggestions to use Numpy/Scipy/etc. - our customer is using Matlab, and I needed to learn how to access it through COM). Matlab's COM API is actually pretty clean/simple, but there are a few wrinkles, some undocumented "magic strings", and some odd surprises. Also, the Matlab COM API was designed for...
9
5284
by: Carl | last post by:
I am desperately looking for a way to call Python from Matlab. I have become used to Python's rich syntax and large number of libraries, and feel ridiculously clumsy being stuck with Matlab's rather restricted facilities for doing other things than standard mathematical work. Does anyone know of good techniques (or readily available software) for achieving a cross-language support between Python and Matlab? Carl
1
3297
by: rini | last post by:
Using the Shell command I am calling an exe generated from matlab. The black console appears but for a moment only.I am not being able to see the output.How this problem can be solved? Please help.Thank you.
3
27231
by: Ajith Menon | last post by:
Do any body know how to use the functions available in the MATLAB using C#? ( To be specific, functions COHERE used to find Coherence and TFE to calculate Transfer function are needed. These functions are available in the MATLAB SP toolbox) These functions require input waveforms X and Y, which is nothing but two array of samples (datatype=double).
1
1082
by: eric_jin | last post by:
i wrote a c# webservice to call matlab functions. add is the function written in matlab,and then make it dll to use in c#; //add.m function result=add(left,right) result=left + right; //end of add.m
4
13731
by: itcecsa | last post by:
Hi, I am implementing a small Python project, what I am going to do is to open Matlab and run some M-files, and get some output from Matlab command prompt. I have no idea how to open Matlab from Python! Any suggestions would be appriciated!
0
1630
by: rperera | last post by:
1. I want to call a matlab function that my colleague did in Matlab from Python E.g >>matlab.DetermineOutputValues(text,ArrayOfValues) My input is text, and ArrayOfValues is the value calculated and passed from MatLab There is a module called pymat and in addition there is a mlabwrap. I have not seen one simple example that illustrates what I am trying to do
2
3064
by: sree12 | last post by:
Hi, Can anyone of u help me to call Matlab functions from c++ program. I need to write a c++ program and from this, i need to carry out a few calculations and need to plot the graphs. I have Matlab Component Runtime. Will it enough? or need any other to do the above things. Thanks in advance...........
14
3128
by: Luna Moon | last post by:
Dear all, Can C++/STL/Boost do the vectorized calculation as those in Matlab? For example, in the following code, what I really want to do is to send in a vector of u's. All other parameters such as t, l1, l2, l3, etc. are scalars... But u is a vector.
0
7934
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8425
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
5886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5445
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3912
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1271
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.