View documentation for other releases
Learn more about MATLAB Coder
• Getting Started
• Product Overview
• Product Description
Key Features
• About MATLAB Coder
When to Use MATLAB Coder
What You Can Do with the Project Interface
When to Use the Command Line (codegen function)
• Code Generation for Embedded Software Applications
See Also
Code Generation for Fixed-Point Algorithms
Installing Prerequisite Products
Related Products
Setting Up the C/C++ Compiler
Expected Background
• Workflow Overview
• Running MATLAB Coder Demos
MATLAB Coder Demos About Generating C Code
MATLAB Coder Demos About Generating MEX Functions
• Tutorials
• Generating C Code from MATLAB Code Using the MATLAB Coder Project Interface
Learning Objectives
Tutorial Prerequisites
Example: The Kalman Filter
Files for the Tutorial
Design Considerations When Writing MATLAB Code for Code Generation
Tutorial Steps
Key Points to Remember
Learn More
• Generating C Code from MATLAB Code at the Command Line
Where to Learn More
• Generating MEX Functions from MATLAB Code at the Command Line
Example: Euclidean Minimum Distance
• Best Practices for Working with MATLAB Coder
• Recommended Compilation Options for codegen
-c Generate Code Only
-report Generate Code Generation Report
Testing MEX Functions in MATLAB
Comparing C Code and MATLAB Code Using Tiling in the MATLAB Editor
Using Build Scripts
Using the MATLAB Code Analyzer to Check Code Interactively at Design Time
Separating Your Test Bench from Your Function Code
Preserving Your Code
File Naming Conventions
• User's Guide
Code Generation Workflow
• Bug Reports
Check Bug Reports for Latest Issues and Fixes
• Setting Up a MATLAB Coder Project
MATLAB Coder Project Set Up Workflow
Creating a New Project
Opening an Existing Project
Adding Files to the Project
• Specifying Properties of Primary Function Inputs in a Project
• Autodefining Input Types
• Defining Input Parameters by Example in a Project
• Defining or Editing Input Parameter Type in a Project
Defining Constant Input Parameters in a Project
Defining Inputs Programmatically in the MATLAB File
Adding Global Variables in a Project
• Specifying Global Variable Type and Initial Value in a Project
• Output File Name Specification
• Specifying Output File Locations
• Selecting Output Type
More About
• Preparing MATLAB Code for C/C++ Code Generation
Preparing MATLAB Code for C/C++ Code Generation Workflow
• Fixing Errors Detected by the Code Analyzer
• How to Generate MEX Functions Using the MATLAB Coder Project Interface
• How to Generate MEX Functions at the Command Line
• Fixing Errors Detected at Code Generation Time
• Design Considerations When Writing MATLAB Code for Code Generation
Running MEX Functions
Debugging Strategies
• Testing MEX Functions in MATLAB
Workflow for Testing MEX Functions in MATLAB
Why Test MEX Functions in MATLAB?
• How to Verify MEX Functions in a Project
How to Verify MEX Functions at the Command Line
• Debugging Run-Time Errors
• Generating C/C++ Code from MATLAB Code
• C/C++ Code Generation
• Generating C/C++ Static Libraries from MATLAB Code
• Generating C/C++ Dynamically Linked Libraries from MATLAB Code
• Generating Standalone C/C++ Executables from MATLAB Code
• Build Setting Configuration
• Primary Function Input Specification
• Speeding Up Compilation
• Code Optimization
• Paths and File Infrastructure Setup
• Code Generation for More Than One Entry-Point MATLAB Function
• Code Generation for Global Data
• Generation of Traceable Code
Code Generation for Enumerated Types
• Code Generation for Variable-Size Data
Code Generation for MATLAB Classes
• How MATLAB Coder Partitions Generated Code
• Customizing the Post-Code-Generation Build Process
• Code Generation Reports
• Troubleshooting
• Deploying Generated Code
Calling a C Static Library Function from C Code
Calling a C/C++ Static Library Function from MATLAB Code
• Calling Generated C/C++ Functions
Using a MATLAB Coder Dynamic Library in a Simple Microsoft Visual Studio Project
• Custom C/C++ Code Integration
• Accelerating MATLAB Algorithms
Workflow for Accelerating MATLAB Algorithms
How to Accelerate MATLAB Algorithms
• Modifying MATLAB Code for Acceleration
• Speeding Up MATLAB Algorithms with the Basic Linear Algebra Subprograms (BLAS) Library
• Controlling Run-Time Checks
Accelerating Simulation of Bouncing Balls
• Calling C/C++ Functions from Generated Code
• MATLAB Coder Interface to C/C++ Code
• Calling External C/C++ Functions
Returning Multiple Values from C Functions
• How MATLAB Coder Infers C/C++ Data Types
Class Reference
• Functions
Examples
• Release Notes
Symbols A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Alphabetical List