MATLAB Answers

how to build an interface between matlab and another software

79 ビュー (過去 30 日間)
Romain W
Romain W 2012 年 3 月 29 日
編集済み: John Kelly 2015 年 2 月 26 日
Hi everyone,
I would like to get some advice on how to build an interface between Matlab and another software like in my case, CalculiX. I actually do not know how to automate the process of sending input from a matlab GUI to calculiX and then send the output from CalculiX solvers back to our Matlab GUI to visualise the simulation results. Any help would be more than welcome, thank you very much,
% Romain

  0 件のコメント

サインインしてコメントする。

採用された回答

Geoff
Geoff 2012 年 3 月 29 日
One of the easiest to implement and most compatible ways to interface between different applications is to use files for communication. If there's not a huge performance requirement, you can have a script in each application sit around waiting for a file to appear, then read its contents and write out to a file that the other application is waiting for. I generally write to temporary files, and then rename when writing is complete. Polling for files once a second should be adequate for just about anything. Most applications that provide some form of scripting will also provide some form of file I/O.

  1 件のコメント

Kumar Shivu
Kumar Shivu 2014 年 4 月 23 日
Hello Geoff ,
I would like to get more advice on this suggestion of yours. Can you tell me how can we find out where these communication files are usually stored . Can you advice me a general way to find These communication files.
Thank you very much in Advance
Kumar

サインインしてコメントする。

その他の回答 (2 件)

Matt Kindig
Matt Kindig 2012 年 3 月 29 日
I don't know anything about CalculiX, but from a quick Google search it seems that CalculiX can be run from the Windows command prompt. You can send commands to the command prompt through the 'system' command and read the outputs from there.
doc system

  1 件のコメント

Kumar Shivu
Kumar Shivu 2014 年 4 月 23 日
Hello Matt ,
Actually i am also working on something like this. Trying to look for methods to Interface between Matlab and another sofware. When i open the Software, it first´opens a command prompt window and the GUI appears .And when i close the command prompt the Software GUI Closes . So this means that even i can follow your suggestion to send commands through command prompt. But can you give an example so that i can understand how to pass commands and read the ouputs
Thank you very much in Advance
Kumar

サインインしてコメントする。


Kaustubha Govind
Kaustubha Govind 2012 年 3 月 29 日
編集済み: John Kelly 2015 年 2 月 26 日
MATLAB offers several ways of interfacing with external software. See External Interfaces. I would first start with researching what external interfacing options CalculiX offers and see if any of those match with the ones MATLAB offers. If CalculiX doesn't offer any interface other than as an executable, then you should use Matt's solution.

  0 件のコメント

サインインしてコメントする。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by