필터 지우기
필터 지우기

Tunable array dimension parameter for code generation

조회 수: 2 (최근 30일)
Gergely Bencsik
Gergely Bencsik 2021년 10월 20일
Hello
I would like to set the dimension of some of my Input / Output ports as a defined parameter in a way that the generated code shall use the definition.
So I created a Simulink Parameter 'ARRAY_DIM' with value of 11, and Storage Class 'Define', and I gave the Input port Dimension field this parameter.
I expect the generated code to use it with the definition, so something like 'Input12[ARRAY_DIM]', so that I may manually change ARRAY_DIM however I like for C-Code variant builds.
However, the generated code uses literal constants, so 'Input12[11]'.
Is there any way to force the usage of the parameter? Does it have to be a variable size signal?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by