Discussion:
Simulink - freeze sample
(too old to reply)
Matt Jones
2005-01-05 17:31:34 UTC
Permalink
Hi,

I'm puzzled as to the best way (or any way!) of freezing or 'holding'
a sample. Basically, I'm looking at the level of a signal, then I
want to compare this level with the level AFTER I change the signal
in some way (eg. amplify it).

Ideally I would have some kind of zero-order hold block with a second
input where, if = 1, outputs what it gets at its input, and if = 0,
output the last sample it got at its input BEFORE THE SECOND INPUT
WAS SET TO ZERO!

Is there anything like this? Bear in mind I may have a fairly
outdated version of Simulink.

Any help greatly appreciated!
Cheers,

Matt
e***@yahoo.com
2005-01-05 20:30:20 UTC
Permalink
Post by Matt Jones
Hi,
I'm puzzled as to the best way (or any way!) of freezing or 'holding'
a sample. Basically, I'm looking at the level of a signal, then I
want to compare this level with the level AFTER I change the signal
in some way (eg. amplify it).
Ideally I would have some kind of zero-order hold block with a second
input where, if = 1, outputs what it gets at its input, and if = 0,
output the last sample it got at its input BEFORE THE SECOND INPUT
WAS SET TO ZERO!
Is there anything like this? Bear in mind I may have a fairly
outdated version of Simulink.
Any help greatly appreciated!
Cheers,
Matt
You can use an enabled subsystem with your second input as the enable
signal. You do not have to do anything inside the enabled subsystem.
Navan

Loading...