How to Add a Header file(#include"*.h") from simulink ?

Suppose im converting Manual Written C code to Simulink model.. in C code im having the header file let us say #include"Myfile.h".. How to add this Header file from the Simulink? which block of the simulink supports this? so that i can get the same Header file name in the generated C file from the Simulink.

 채택된 답변

Titus Edelhofer
Titus Edelhofer 2015년 1월 16일

2 개 추천

Hi,
under the code generation pane for the Simulink Configuration there is the entry "Custom Code". Here you can add you header file.
Interesting would be why you need this? I guess in your code comes something where you need the header file to be included. How does this code get into your generated code? Usually it's a good idea to add the header there ...
Titus

댓글 수: 1

Hi thanks for answer . can you please answer below questions
When im converting Legacy C files to simulink model for automotive apllications, i come across several doubts like if there is any break statement in C file if condition ----- ----- break; and pointer Variable( int *p), function pointer and some pointer operatios How can i model all these equally in simulink ?
The requirement is the functionality of the Legacy C file must be fullfilled by the generated C file from the simulink
Gangadhar

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by