I'm using Embedded Coder. Is there a way to configure the code generation process so that the dimensions of an input signal can be set at run time?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
The general workflow here is to use variable size signals from a selector where the upper bound of the variable size signal is explicity set.
However, I'm autogenerating a signal representing an image (960x1280) in an application where memory management is critical. The selected signal is very often only a small subset of the maximum signal size and only needs to be set prior to initialization. A variable sized signal would result in the upper bound 960x1280 signal being propogated through my model. Where as, what I would call a configurable run-time parameter could allocate just the memory that is required at initialization. The work flow would then be as follows, If the image size selection is changed then the code would be terminated and re-initialized with the new dimensions. Is there a way to setup the code generation process to support this workflow?
I will also point out that dynamic memory application is not an acceptable solution for our application.
0 comentarios
Respuestas (1)
Nick Sarnie
el 17 de Nov. de 2018
Editada: Nick Sarnie
el 17 de Nov. de 2018
Hi David,
Variable size signals are meant for signals that will change size during the execution of the model. It sounds like the size of your signals will be constant once the model starts, but will change betweens runs of the model.
You may want to investigate into Symbolic Dimensions. You can find an example below:
Thanks,
Nick
Ver también
Categorías
Más información sobre Deployment, Integration, and Supported Hardware 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!