Use C++ to initialise matlab and run an m-file

조회 수: 3 (최근 30일)
John
John 2012년 4월 19일
Hi, I want to find some c++ code which will initialise an instance of matlab and run a specific m file. I am running a UDP interface between an aircraft simulation in MATLAB and the X-Plane environment.
What I want to happen is that when X-Plane loads, I can include in my plugin (written in c++) a line of code that says run aircraftsim.m which will start MATLAB if it is not started and run the m-file.
Moreover, it would be nice if I could get this to work on another computer. I.e. X-Plane on one computer and MATLAB in another.
Thank you in advance for help with this!
John

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 4월 19일
Is MATLAB somehow accessible on the computer with X-Plane? If yes, you can use one of several External Interfaces. Since you are using C++, the MATLAB Engine API seems most appropriate.

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by