주요 콘텐츠

가변 크기 데이터

정의 및 코드 생성 시 차이점

MATLAB Function 블록과 MATLAB System 블록에 변수를 가변 크기로 지정할 수 있습니다. 가변 크기는 컴파일할 때 데이터 크기를 알 수 없거나 런타임에 데이터 크기가 변하는 데이터입니다.

블록

MATLAB FunctionSimulink 모델에 MATLAB 코드 포함
MATLAB SystemInclude System object in model

함수

coder.areUnboundedVariableSizedArraysSupportedCheck if current configuration settings allow unbounded variable-size arrays (R2024a 이후)
coder.varsizeResolve size incompatibility errors and declare upper bounds

도움말 항목

문제 해결

가변 크기 데이터 오류의 진단 및 수정

크기 불일치 및 상한 감지 오류를 해결합니다.

Resolve Error: coder.varsize Not Supported for Strings

Troubleshoot code generation error when using coder.varsize with string variables.

추천 예제