Simulink Coder generating C code with explicit function interface, not struct. Is it possible?
이전 댓글 표시
With Simulink a simple add funtion, and the Coder generating C code like this:
void myadd_step(void)
{
/* Outport: '<Root>/c' incorporates:
* Inport: '<Root>/a'
* Inport: '<Root>/b'
* Sum: '<S1>/Add'
*/
myadd_Y.c = myadd_U.a + myadd_U.b;
}
Can I with some configuration to make the generating code like this:
float my_add(float a, float b)
{
return a+b;
}
I know that Matlab Coder can do this, wondering if Simulink can do this also?
댓글 수: 1
James Tursa
2017년 5월 22일
What is a "void float"? Did you mean just "float"?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 代码生成에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!