Main Content

C에서 MATLAB 호출하기

mxArray를 사용하여 C 프로그램에서 MATLAB® 코드 실행

참고

C용 Engine API의 함수들은 C Matrix API에 정의된 MATLAB mxArray 데이터 구조를 사용합니다. 최신 C++ 기능을 사용하여 애플리케이션을 작성하려면 C++에서 MATLAB 호출하기 항목을 참조하십시오.

엔진 애플리케이션은 MATLAB을 계산 엔진으로 사용하여 사용자 자신의 C/C++ 프로그램에서 MATLAB을 호출할 수 있게 해 주는 독립 실행형 프로그램입니다. 엔진 애플리케이션을 빌드하려면 mex 함수를 호출하십시오.

엔진 애플리케이션을 사용하려면 MATLAB이 설치되어 있어야 합니다. MATLAB Runtime만 설치된 컴퓨터에서는 MATLAB 엔진을 실행할 수 없습니다.

C용 Engine API

EngineMATLAB Engine 유형
engOpenMATLAB Engine 세션 시작
engOpenSingleUseStart MATLAB engine session for single, nonshared use
engCloseMATLAB Engine 세션 종료
engEvalStringEvaluate expression in string
engGetVariableCopy variable from MATLAB engine workspace
engPutVariablePut variable into MATLAB engine workspace
engGetVisibleDetermine visibility of MATLAB engine session
engSetVisibleShow or hide MATLAB engine session
engOutputBufferSpecify buffer for MATLAB output

도움말 항목

엔진 애플리케이션 작성

Windows 애플리케이션을 빌드하고 실행하기

Mac 애플리케이션을 빌드하고 실행하기

Linux 애플리케이션을 빌드하고 실행하기

통합 개발 환경에서 빌드

문제 해결

MATLAB 엔진을 시작할 수 없음

MATLAB 엔진이 실행되지 않을 때 수행할 작업.

Debug MATLAB Function Called by C Engine

How to verify MATLAB functions used in engine applications.

User Input Not Supported

Some MATLAB functions that interact with the user are not supported in engine applications.

Multithreaded Applications

MATLAB libraries are not thread-safe.