Turning on the 'Optimize using the specified minimum and maximum values' setting seems to remove critical code
3 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2018 年 9 月 27 日
編集済み: MathWorks Support Team
2023 年 6 月 21 日
Hi, I'm using Embedded Coder to generate code for my model. In the Config Params under 'Optimization', there is a setting called 'Optimize using the specified minimum and maximum values'. I observe that when this setting is off, I'm able to generate code for my model as desired. However, when this setting is turned on, I observe code corresponding to a part of a subsystem to be removed ("optimized" away) and this is undesirable.
Is this a bug?
採用された回答
MathWorks Support Team
2023 年 6 月 21 日
編集済み: MathWorks Support Team
2023 年 6 月 21 日
Please review the code that seems to be removed when the 'Optimize using the specified minimum and maximum values' setting is turned on. It is possible that the code is dead or unreachable due to maximum or minimum limits you specify for your signals or parameters. This setting tells the code generation algorithm that there are parts of the model that are unused and therefore, it is redundant to generate code for them. For more information on this setting, please review the following documentation page:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Manual Performance Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!