Similink create 2 Initialize Procs

3 ビュー (過去 30 日間)
hoa phan
hoa phan 2023 年 6 月 29 日
回答済み: Harsh 2025 年 2 月 20 日 6:26
Hi,
I use Matlab to generate code and the output generated code as below:
FUNC(void, DASwCpt_SentAcqn_CODE) DASwCpt_SentAcqn_Proc_Ini(void)
{
...
}
FUNC(void, DASwCpt_SentAcqn_CODE) RE_DASwCpt_SentAcqn_Initialize(void)
{
/* (no initialization code required) */
}
I don't know why it always create the RE_DASwCpt_SentAcqn_Initialize proc,
How to setup the model to avoid creating this proc
Thanks

回答 (1 件)

Harsh
Harsh 2025 年 2 月 20 日 6:26
You can remove the zero-initialization code for internal data in the following ways:
  • Open the Configuration Parameters dialog box. On the Optimization pane, select Remove internal data zero initialization
  • Use the following command prompt to set the model parameter ZeroInternalMemoryAtStartup to off
set_param(model, 'ZeroInternalMemoryAtStartup', 'off');
For more information regarding this please use the following command to view the documentation-
doc Remove Zero Initialization Code

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by