- Use Simulink.Parameter
- Specify its storage class as "ImportFromFile" and specify a HeaderFile name.
Questions regarding Unit Delay block initial condition and model recompilation
11 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have two questions regarding the behavior of the Unit Delay block in Simulink:
For the Unit Delay block, when the initial condition is set to a vector, is it possible to declare this initial condition using a Simulink.Signal or a Simulink.Parameter ?
Are there any restrictions or special considerations when using these types of objects as the initial condition?
When compiling a Simulink model that contains a Unit Delay block, and after generating the compiled model, if I later want to change the initial condition of the Unit Delay block, do I need to go back to Simulink, modify the initial condition, and recompile the model? Or is it possible to adjust the initial condition parameter after the model has been compiled and is being used in a simulation environment?
Thank you for your help!
0 件のコメント
回答 (1 件)
Fangjun Jiang
2024 年 8 月 22 日
When the code is generated, the value of this parameter will be generated in the header file. Then you can modify its value, use a different version of the header file, or use some calibration tool, without the need to modify the model and re-generate code.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!