Why does C code generated by MATLAB Coder have numerical values already assigned to some internal variables of functions while the original MATLAB user defined function requires user input for those variables?

조회 수: 1 (최근 30일)
I am using MATLAB Coder to generate C code. The original MATLAB user defined function has some variables that should be assigned values by the user. On the other hand I find the generated C code has already values assigned and the operations within the function are performed using those fixed numerical values in place of variables. These numerical values are on the basis of the example inputs I provide while using the MATLAB Coder GUI.
  댓글 수: 1
Ryan Livingston
Ryan Livingston 2018년 3월 23일
편집: Ryan Livingston 2018년 3월 23일
It sounds like you may have defined the inputs to be constants. The way you would accomplish this in the Coder App is by clicking the Define Constant link described here and shown here.
You may also be using coder.Constant. Are any of those true? If not, can you please describe how you are specifying your input types?

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

답변 (1개)

Tony Mohan Varghese
Tony Mohan Varghese 2018년 3월 22일

카테고리

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