필터 지우기
필터 지우기

how to use a C++ program to call a Matlab script

조회 수: 8 (최근 30일)
Lara
Lara 2011년 3월 8일
댓글: Matthew Holub 2019년 2월 25일
How to call a matlab script from an C++ program (not visual C) on Linux Red Hat. How easy is it to do this? What are the steps? How do I code C++ to invoke the script? How do I compile the C++ to create an executable? Can someone answer this? Is this supported on Red Hat Linux 5.5? Thanks.

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2011년 3월 8일
편집: Kaustubha Govind 2014년 10월 30일
If you are running the C++ application on a machine that has MATLAB installed, see MATLAB Engine API for C, C++, and Fortran.
If you need to run this executable on a machine that does not have MATLAB installed, you can get the MATLAB Compiler to compile MATLAB code into a shared library and call it from your C++ code.
  댓글 수: 1
Matthew Holub
Matthew Holub 2019년 2월 25일
I am trying to use the startMATLAB() function in c++, but I am getting a segmentation fault. Could you refer to my question here to try to help me out? : https://www.mathworks.com/matlabcentral/answers/446762-segmentation-fault-when-calling-function-startmatlab-in-c-code
Thank you very much

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by