MATLAB Answers

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

11 views (last 30 days)
Xiaojie Qiu
Xiaojie Qiu on 24 Oct 2018
Commented: Xiaojie Qiu on 29 Oct 2018
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?
Thanks!

Accepted Answer

zhichuan wang
zhichuan wang on 24 Oct 2018
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 Comments
Xiaojie Qiu
Xiaojie Qiu on 29 Oct 2018
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!
qxj

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by