라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

C/C++ Source Files

Write C/C++ functions using MATLAB® API libraries

A MEX-file lets you call a C function from MATLAB. To create a C/C++ MEX-file, you need:

For information about writing Fortran MEX-files, see Fortran Source Files.

For information about using the loadlibrary and calllib commands to call functions in shared libraries, see Call C Shared Libraries.

For information about writing S-functions using C or C++ code, see your Simulink® documentation.

MEX-files are not appropriate for all applications. MATLAB is a high-productivity environment whose specialty is eliminating time-consuming, low-level programming in compiled languages like C or C++. In general, do your programming in MATLAB. Do not use MEX-files unless your application requires it.

Was this topic helpful?