MATLAB & Simulink

Language and Programming

Matlab to C with Matlab Coder

Course Highlights

This two-day course focuses on generating C code from MATLAB code using the 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

Who Should Attend 

The aim of this course is to provide participants with deployment option of their Matlab code to C code.

Course Benefits

Upon the completion of the course, the participants will be able to generate optimized C code from their MATLAB code and integrate the code into parent projects and external module.

Prerequisite

Partners 

Upcoming Program

Techsource Systems is
Mathworks Sole and Authorised Distributor and Training Partner

Attended "Comprehensive MATLAB" or equivalent experience in using Matlab and knowledge of C programming language.

Course Outline

Day 1 of 2

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

 

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

 

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

Day 2 of 2

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

 

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

  • Facebook Social Icon
  • Twitter Social Icon
  • Google+ Social Icon
  • YouTube Social  Icon
  • Pinterest Social Icon
  • Instagram Social Icon
All rights reserved. Copyright © TechSource Systems Pte Ltd. Company Registration No. 199603163W
linkedin.png
  • Facebook