구조체
코드 가속화 구조체 및 지원되는 연산
Fixed-Point Designer™는 연산에 대한 제한 사항, 스칼라 구조체 값의 속성에 대한 제한 사항 및 구조체 배열에 제한 사항이 있는 구조체의 가속화 및 변환을 지원합니다. 코드에 구조체형 배열뿐만 아니라 스칼라 구조체도 사용할 수 있습니다. 하위 구조체와 필드에 값을 인덱싱하고 할당할 때 관련 제한 사항을 준수하십시오. 구조체 인수는 참조로 또는 값으로 전달됩니다.
도움말 항목
- Structure Limitations for Code Generation (MATLAB Coder)
Adhere to code generation restrictions for structures.
- Pass Structure Arguments by Reference or by Value in Standalone Code (MATLAB Coder)
Control whether structure arguments are passed by reference or by value.
- Name C Structure Type to Use with Global Structure Variable (MATLAB Coder)
Use
coder.cstructnameto define a type object for a global structure. - 구조체형 배열에 대한 코드 생성하기 (MATLAB Coder)
이 예제에서는 코드 생성에 적합하도록 구조체형 배열을 사용하는 MATLAB® 함수를 작성하는 방법을 보여줍니다.