This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Data Definition for Code Generation

To generate efficient standalone code, you must define the following types and classes of data differently than you normally would when running your code in MATLAB®.

DataWhat's DifferentMore Information
ArraysMaximum number of elements is restrictedArray Size Restrictions for Code Generation
Complex numbers
  • Complexity of variables must be set at time of assignment and before first use

  • Expressions containing a complex number or variable evaluate to a complex result, even if the result is zero

    Note:   Because MATLAB does not support complex integer arithmetic, you cannot generate code for functions that use complex integer arithmetic

Code Generation for Complex Data
CharactersRestricted to 8 bits of precisionCode Generation for Character Arrays
Enumerated data
  • Supports integer-based enumerated types only

  • Restricted use in switch statements and for-loops

Function handles
  • Using the same bound variable to reference different function handles can cause a compile-time error.

  • Cannot pass function handles to or from primary or extrinsic functions

  • Cannot view function handles from the debugger

Function Handles

Was this topic helpful?