Code generation: Define own function name for "interp1"

조회 수: 3 (최근 30일)
circle_d
circle_d 2018년 6월 4일
답변: TAB 2018년 6월 5일
Hello, I´m using "matlab function" within simulink. Within this matlab function block I also use the MATLAB function "interp1". If I generate code the target compiler makes "aaiemoppkfknmohl_interp1" out of it. I would prefer an shorter name like "interp1_own" for example. Is it possible to reach this with via the "code replacement tool"? All my tries with the "crtool" failed until now. My impression is that I can only modify standard matlab function like "abs", "sqrt",.... Is this right? Thanks a lot

답변 (1개)

TAB
TAB 2018년 6월 5일
You can control the function name using Function packaging option.
  1. Item twoRight click on Matlab function block --> Select "Block Parameters (Subsystem)"
  2. In Main tab, make sure "Treat as Atomic Unit" is selected
  3. Go to Code Generation tab and configure function packaging options

카테고리

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