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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Ryan Livingston
el 23 de Mzo. de 2018
Editada: Ryan Livingston
el 23 de Mzo. de 2018
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?
Respuestas (1)
Tony Mohan Varghese
el 22 de Mzo. de 2018
You can refer to this answer by Ryan Livingstone:
0 comentarios
Ver también
Categorías
Más información sobre MATLAB Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!