필터 지우기
필터 지우기

Specifying function names in generated code using emlc

조회 수: 1 (최근 30일)
Todd
Todd 2011년 8월 19일
How do I specify what name emlc will assign to a function that it generates? I'm looking for something like the eml.cstructname function to specify what name I want it to use in the generated code. Right now, it prepends something like 'm_pref2_' to the function name. But, I am generating functions to be called by code that is already written.
emlc will assign a predictable name to the top-level function. But, if I make that function a subfunction and generate code, emlc changes the name of my function.
I could generate code for each function separately, but then I have to deal with different versions of common supporting functions, like mldivide, or functions with variable size inputs.

답변 (1개)

Fred Smith
Fred Smith 2011년 8월 22일
Hi Todd,
You can specify multiple top-level functions to EMLC. Each top-level entry point will have the name you gave it in your MATLAB code.
It is not a good idea to rely on the names EMLC uses internally as these may change arbitrarily as you update your code.
Good luck.
-Fred

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by