how to build an interface between matlab and another software
53 views (last 30 days)
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,
Geoff on 29 Mar 2012
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.
More Answers (2)
Matt Kindig on 29 Mar 2012
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.
Kaustubha Govind on 29 Mar 2012
Edited: John Kelly on 26 Feb 2015
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.