- Use Simulink.Parameter
- Specify its storage class as "ImportFromFile" and specify a HeaderFile name.
Questions regarding Unit Delay block initial condition and model recompilation
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Fangjun Jiang
am 22 Aug. 2024
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 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!