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 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Nick Sarnie
2018 年 11 月 17 日
編集済み: Nick Sarnie
2018 年 11 月 17 日
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
参考
カテゴリ
Help Center および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!