solver in the generated code
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Can you please tell me which targets in Simulink Coder do not have a solver hard coded into the code generated. For example, in the configuration parameters pane of simulink, we select a solver, start time and stop-time. After setting this value, we generate the code. All these settings will be hard coded into the code generated from the GRT target. I do not want the code to include the solver. Is there any way where i can specify not to include the solver? If not, can you please tell me which target generates code without solver?
0 comentarios
Respuestas (1)
Swastik Sarkar
el 23 de Jun. de 2023
In Simulink Coder, the choice of solver and its configuration settings are typically embedded in the generated code to ensure that the simulation behavior is accurately represented in the generated executable or code.
As you want to generate code without the solver being hard-coded into it, you can consider using the "Fixed-Step" solver option and manually remove the solver related components.
The fixed-step solvers use a predetermined step size, eliminating the need to include solver-related code in the generated code.
Another option is to use the embedded coder, which means to use "ert.tlc" as the target.
You can follow this link to Generate code using Embedded Coder
Also make sure to turn off MAT-File Logging, you will see that there will be a main driver c file which calls the step function from model.c infinitely.
0 comentarios
Ver también
Categorías
Más información sobre Simulink 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!