- Use Simulink.Parameter
- Specify its storage class as "ImportFromFile" and specify a HeaderFile name.
Questions regarding Unit Delay block initial condition and model recompilation
31 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mohamed
el 22 de Ag. de 2024 a las 8:52
Respondida: Fangjun Jiang
el 22 de Ag. de 2024 a las 12:50
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 comentarios
Respuestas (1)
Fangjun Jiang
el 22 de Ag. de 2024 a las 12:50
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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!