MATLAB to C with MATLAB Coder

Learn to develop MATLAB code that is ready for C code generation, optimize code, and integrate code into projects

Complimentary Services: Post training email support & 1-hr consultation session within 1 month after the course completion!

TechSource Systems Pte Ltd

Course
Highlights

This two-day course focuses on generating C code from MATLAB® code using MATLAB Coder™. The focus is on developing MATLAB code that is ready for code generation, generating C code that meets optimization requirements, and integrating generated code into parent projects and external modules. This course is intended for intermediate to advanced MATLAB users.

TechSource Systems Pte Ltd

Who Should
Attend

Engineers who need to deploy of their MATLAB code to C code.

TechSource Systems Pte Ltd

Course
Prerequisites

MATLAB Fundamentals and knowledge of C programming language.

TechSource Systems Pte Ltd

Course
Benefits

Upon the completion of the course, the participants will be able to:

  • generate optimized C code from their MATLAB code
  • integrate the code into parent projects and external module

Partners

TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

TechSource Systems is MathWorks Authorised Reseller and Training Partner

Upcoming Program

  • Please keep me posted on the next schedule
  • Please contact me to arrange customized/ in-house training

Course Outline

Code Generation with MATLAB Coder

Objective: Become familiar with MATLAB Coder and its applications.

  • MATLAB Coder overview
  • Workflow for generating C code from MATLAB code
  • Generating C code
  • Verifying generated code
  • Navigating generated code
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Preparing MATLAB Code for Code Generation

Objective: Use MATLAB Coder coding standards to write MATLAB code that is ready for code generation.

  • Translating MATLAB code into C code
  • Calling unsupported MATLAB functions
  • Preparing existing MATLAB code
  • Code preparation workflows

Working with Fixed-Size Data

Objective: Generate C code from MATLAB code that has fixed-size or constant inputs.

  • Data characteristics overview
  • Specifying fixed-size, top-level inputs
  • Specifying constant top-level inputs
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Working with Variable-Size Data

Objective: Generate C code from MATLAB code that has variable-size inputs or local data.

  • Specifying variable-size, top-level inputs
  • Specifying variable-size local data
  • Reusing variables

Working with Global Data, Structures, and Cell Arrays

Objective: Generate C code from MATLAB code that contains persistent data, global variables, input structures, or cell arrays.

  • Persistent variables
  • Global variables
  • Working with structures
  • Cell arrays in generated code
  • Passing arguments by reference
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Integrating with External Code

Objective: Integrate generated C code from MATLAB Coder with external C code.

  • Code integration overview
  • Entry points to generated code
  • Integrating external C code using MATLAB Coder interface
  • Integrating external C code using an external IDE
  • Calling external C functions
  • Code verification and profiling
  • Source code debugging

Optimizing Generated Code

Objective: Use various options and techniques to optimize generated code.

  • Code optimization with loop unrolling and null initialization
  • Function inlining and file partitioning
  • Configuration objects
  • Removing unnecessary code
  • Naming conventions in generated code
  • Converting a project to a script
TechSource Systems Pte Ltd
QUICK ENQUIRY