How to make block description of a simulink function block displayed above function header?

조회 수: 3(최근 30일)
Hi everyone,
I'm using simulink function block to generate C code. For simulink function block, I add a brief function description to the block as shown below on the left side.
After code generation, the function description is inserted inside the function body.
So, I want to know if there is a way to display this description above the function header instead of inside the function body?

채택된 답변

zhichuan wang
zhichuan wang 2018년 10월 24일
I think I get you point. You can modify the CODE TEMPLATES FILE in Configuration Parameters(Code Generation->Templates-Code templates-Source file template) to do what you want.
  댓글 수: 5
Xiaojie Qiu
Xiaojie Qiu 2018년 10월 29일
Hi Zhichuan,
after code generation by using MATLAB R2017b, I also got the same result as you.
So, I have to draw a conclusion, that this problem is a side effect due to MATLAB version.
If you have any idea in the future, please tell me how to solve it. Thanks for your help again!

댓글을 달려면 로그인하십시오.

추가 답변(0개)


Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by