| Embedded MATLAB™ | ![]() |
| On this page… |
|---|
A Subset of the MATLAB Language Embedded MATLAB Inference Engine |
Embedded MATLAB™ is a subset of the MATLAB® language that supports efficient code generation for deployment in embedded systems and acceleration of fixed-point algorithms.
Embedded MATLAB technology uses an inference engine to enforce language constraints for simulation and code generation. The inference engine works with Real-Time Workshop® code generation software to convert code from a dynamically typed language (MATLAB) to a statically typed language (C), without using dynamic memory allocation. To convert data types accurately, the Embedded MATLAB inference engine requires that you define the class, size, and complexity of data in the source code so it can assign data types correctly at compile time.
The Embedded MATLAB subset supports the following MATLAB language features:
N-dimensional arrays
Matrix operations
Subscripting (see Using Matrix Indexing Operations)
Complex numbers (see Working with Complex Numbers)
Numeric classes (see Supported Variable Types)
Double-precision, single-precision, and integer math
Fixed-point arithmetic (see Working with the Fixed-Point Embedded MATLAB Subset in the Fixed-Point Toolbox™ documentation)
if, switch, while, and for statements
Subfunctions (see Calling Functions in the Embedded MATLAB Subset)
Persistent variables (see Declaring Persistent Variables)
Structures (see Using Structures)
Characters (see Working with Characters)
Function handles (see Working with Function Handles)
Frames (see Working with Frame-Based Signals in the Simulink® documentation.
Variable length input and output argument lists (see Specifying Variable Numbers of Arguments in Embedded MATLAB Functions)
Subset of MATLAB functions (see Embedded MATLAB Function Library Reference)
Ability to call MATLAB functions (see How the Embedded MATLAB Subset Resolves Function Calls)
The Embedded MATLAB subset does not support the following MATLAB features:
Cell arrays
Command/function duality
Note The Embedded MATLAB subset supports function-style syntax — but not command-style syntax — for function calls. MATLAB supports both styles (see Command vs. Function Syntax in the MATLAB Programming Fundamentals documentation). |
Dynamic variables
Global variables
Java™
Matrix deletion
Nested functions
Objects
Sparse matrices
Try/catch statements
![]() | Working with the Embedded MATLAB Subset | Using Embedded MATLAB Technology with MathWorks Products | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |