How to latch the value of an array signal at a particular timestep using Simulink
4 次查看(过去 30 天)
显示 更早的评论
Hi,
How to latch(hold) the value of an array signal of size 200(input), if a required condition is met(condition may be provided using a Switch block) at a particular timestep using Simulink ?
The input needs to be latched at that instant when the condition to latch the value becomes true and it should hold that value throughout.
Note: The array input is uint8 type.
Any feedback is appreciated.
0 个评论
回答(1 个)
Abhaya
2024-9-2
Hi Geethika,
To latch the value of a signal at a particular timestep, you can use Simulink “Enabled subsystem” block in the Simulink model. Set the "Output when disabled" property of the subsystem's "Outport" block to "held" to maintain its last value when the subsystem is disabled.
The condition for enabling the subsystem can be provided by Simulink “Switch” block or Simulink comparator blocks.
An example model for holding the value of a signal is provided below.
To explore other methods to hold a value of a signal please follow the blog link given below.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!