Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

데이터 정의 기본 사항

코드 생성을 위해 데이터, 변수 및 함수를 정의하는 방법

블록

MATLAB FunctionInclude MATLAB code in models that generate embeddable C code
MATLAB SystemInclude System object in model

예제 및 방법

Reuse the Same Variable with Different Properties

Reuse a variable with different properties when the code generator can determine the properties of each occurrence of the variable.

Eliminate Redundant Copies of Variables in Generated Code

Use coder.nullcopy to indicate that the code generator can allocate memory without initializing it.

Share Data Globally

Use global data with a MATLAB Function block.

Initialize Persistent Variables in MATLAB Functions

Specialized semantics impact the way that a function initializes persistent data.

개념

Data Definition for Code Generation

Define data in MATLAB® code intended for code generation.

Variables Definition for Code Generation

Define the class, size, and complexity of variables in MATLAB source code before using them.

Best Practices for Defining Variables for C/C++ Code Generation

Follow guidelines for defining variables in MATLAB code intended for code generation.

Supported Variable Types

Use data types that code generation supports.

Reassignment of Variable Properties

Reassign a variable with a value of different class, size, or complexity.

Code Generation for Complex Data

Use complex data in MATLAB code intended for code generation.

Code Generation for Sparse Matrices

Use sparse matrices in MATLAB code intended for code generation.

Code Generation for Constants in Structures and Arrays

Sometimes the code generator does not recognize constant structure fields or array elements.

Array Size Restrictions for Code Generation

The code generator and the target hardware constrain the maximum number of elements of an array.

Edit and Represent Coder Type Objects and Properties

Command line representation of coder type objects.