필터 지우기
필터 지우기

How to improve the running speed after converting to code by setting the properties in the Simulink model?

조회 수: 50 (최근 30일)
After using the C coder to convert the model, I hope that the code can run as quickly as possible without affecting its functionality. Which settings in the properties should I consider? Can functions like inline functions or anything else have a certain effect? Because I found that checking or not to check the inline function function function can result in vastly different numbers and formats of generated files. So, will optimizing the code in this way cause some other unknown problems in code generation due to uncontrollable factors?

채택된 답변

Ganesh
Ganesh 2024년 8월 6일 4:58
편집: Ganesh 2024년 8월 6일 4:59
Hi @peter,
The best way to go about your problem is to have a look at the Code Efficiency Page, for which I am attaching the documentation below:
Each parameter you set will affect your code depending on the model you are using.
If you are using Embedded Coder, you optimize the code in a generic fasion by setting the "Optimization Level" parameter to be "maximum". This would imply that the optimization is to be made keeping code generation parameters in mind. You could also go through the parameters specifically and understand if they will have an effect on your model or not. Do note that you will be disabling debugging by doing so. Attaching the documentation of "Optimization Level" parameter to give you a better understanding:
Hope this helps!
  댓글 수: 1
peter
peter 2024년 8월 6일 8:42
@GaneshThank you very much for your help and the documents listed. I will carefully read these documents and immediately start trying to compare these parameters.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by