Interfacing MATLAB with C Code

in Language and Programming

Course Highlights
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. 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 appraoch for interfacing MATLAB with C code

Course Objectives
The aim of this course is to provide participants on interfacing user-written C code with Matlab

Who Must Attend
This hands-on course is designed for engineers who wish to interface their Matlab code with user-written C code

Course Benefits

Upon the completion of the course, the participants 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, and identify the proper approach for interfacing Matlab with C code

Prerequisites
Familiarity with terminology and concepts related to programming in C (especially pointers). Experience with Matlab is recommended

Course Outline

Day 1 of 1

MEX-File Overview
Objective: Identify required components of a MEX-file and set up the environment for producing MEX-files.

  • Introduction to MEX-files
  • Applications of MEX-files
  • Components of a MEX-file
  • Setting up MATLAB to compile MEX-files
  • Building and running a MEX-file
MEX-Files with Inputs and Outputs
Objective: Create MEX-files with inputs and outputs for interacting with MATLAB environment.
  • Data flow in MEX-files
  • MATLAB data
  • The mxArray class
  • Working with pointers
  • Working with mxArray API functions
  • Working with strings
  • When to use MEX-files
  • Handling data

MEX-File Interface Considerations
Objective: Display diagnostic messages and manage memory in MEX-files.

  • Displaying diagnostic messages
  • Memory allocation and deallocation
  • Preventing memory leaks
  • Working with input and output memory
  • Debugging MEX-file
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.
  • Introduction to the Matlab engine
  • Data Flow in Matlab engine applications
  • Calling the Matlab engine
  • Compiling and running Matlab engine applications

DOWNLOAD REGISTRATION FORM

ONLINE REGISTRATION

 

Course Registration Form


Course Title
Invalid Input

or Key in Your Own Title
Invalid Input

Course Start Date

Invalid Input

Sponsorship (*)
Invalid Input


Contact Person


Salutation(*)
Invalid Input

Name(*)
Invalid Input

Designation/ Department/ Division(*)
Invalid Input

Company(*)
Invalid Input

Billing Address (*)
Invalid Input

Street Address

(*)
Invalid Input

Street Address Line 2

City(*)
Invalid Input

State / Province(*)
Invalid Input

Postal / Zip Code(*)
Invalid Input

Telephone(*)
Invalid Input

Fax
Invalid Input

Email Address (*)
Invalid Input


Participant Details


Participant Salution 1
Invalid Input

Participant Name1
Invalid Input

Designation/ Department/ Division
Invalid Input

Telephone
Invalid Input

Fax
Invalid Input

Email Address
Invalid Input

Dietary Requirement
Invalid Input


Participant Salution 2
Invalid Input

Participant Name2
Invalid Input

Designation/ Department/ Division
Invalid Input

Telephone
Invalid Input

Fax
Invalid Input

Email Address
Invalid Input

Dietary Requirement
Invalid Input


Participant Salution 3
Invalid Input

Participant Name 3
Invalid Input

Designation/ Department/ Division
Invalid Input

Telephone
Invalid Input

Fax
Invalid Input

Email Address
Invalid Input

Dietary Requirement
Invalid Input


Payment Method(*)
Invalid Input

Cheque number
Invalid Input

PO Number
Invalid Input

How did you get to know about this programme?(*)
Invalid Input

Terms and Conditions
Invalid Input

Invalid Input