필터 지우기
필터 지우기

#define Macro in Simulink Embedded Code generation

조회 수: 5 (최근 30일)
Evans Ejegi
Evans Ejegi 2023년 4월 13일
답변: Muskan 2023년 4월 19일
How can the following macro be implemented and used in simulink for code generation:
#define MIN(a,b) (((a)>(b))?(b):(a))

답변 (1개)

Muskan
Muskan 2023년 4월 19일
Hi Evans,
As per my understanding of the question, in the "Header file" field, specify the path to a header file that contains the MIN(a,b) macro definition. In the "Code Generation" tab, add an "#include" directive to include the header file that contains the MIN(a,b) macro definition.
I hope the above information helps resolve your query.
Thanks.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by