Training - Courses
MLEX: Interfacing MATLAB with C Code |
This one-day course focuses on interfacing MATLAB® with user-written C code. Through hands-on examples and exercises, the course explores generating MEX-files to incorporate external C code in MATLAB applications and calling MATLAB code from C applications. At the end of this course, attendees will be able to:
- Write and compile source MEX files
- Pass data between MATLAB and MEX files
- Call MATLAB code from C code using the engine interface
- Identify the proper approach for interfacing MATLAB with C code
Note: A 1 hour test session will be scheduled one day prior to the first day of class. This session is to verify that the visual and audio connection is working properly on your computer. The required product software should be installed for the test session. It is highly recommended that you attend this session to ensure a successful and timely class start.
VIEW SCHEDULE and Register SHARE with Manager/Colleague| Detailed course outline |
|---|
| Day 1 | |
|---|---|
| MEX-File Overview | Objective: Identify required components of a MEX-file and set up the environment for producing MEX-files.
|
| MEX-Files with Inputs and Outputs | Objective: Create MEX-files with inputs and outputs for interacting with MATLAB environment.
|
| MEX-File Interface Considerations | Objective: Display diagnostic messages and manage memory in MEX-files.
|
| Calling MATLAB from C Code | Objective: Call the MATLAB engine from a C application to evaluate MATLAB expressions and transfer data between the C application and the MATLAB engine.
|
Prerequisites
Familiarity with terminology and concepts related to programming in C (especially pointers). Experience with MATLAB is recommended.
Course Length - 1 day