Comments on: How do you hold the value of a signal? https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/?s_tid=feedtopost Guy Rouleau is an Application Engineer for MathWorks. He writes here about Simulink and other MathWorks tools used in Model-Based Design. Wed, 01 Aug 2018 11:47:00 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Vijay Nooji Bhat https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-225931 Wed, 01 Aug 2018 11:47:00 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-225931 I want to hold the newest peak (the last peak – input changing from 0 to 1) for an hour. I used the zero order hold Block for that purpose (sample time 3600s). But the problem with zero order hold block is, it sometimes omits the peak and I am not getting why it does that. Anybody has experience with this matter?

]]>
By: Leigh https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-219830 Tue, 17 Apr 2018 08:51:47 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-219830 I’m using method 3, but i am using output buses instead of single signals. The top enabled subsystem performs a function on a bus of signales. the bottom one is a “pass through” and does nothing with one exception: unfortunately one of the signals should keep its last known value, which is only generated by the top function. The problem is that the merge block needs the buses to be identical. I would love to be able to put a “nul” source on the signal so that merge will see that this particular input is not being “driven” and should therefore just keep its last value from the top function. Otherwise I have to wrap a signal from the top function to the bottom function…

]]>
By: ROBERT DIXON https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-219224 Sun, 25 Mar 2018 06:24:53 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-219224 How to use sweep generator with sample and hold in Simulink/ Powersim? I would like to save all the output values in a text file.

]]>
By: Dhanraj https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-219094 Tue, 20 Mar 2018 14:23:58 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-219094 Could you please explain how can I implement using stateflow. I want to hold the first value of the input signal when hold is true and output a default value when hold is false.

]]>
By: Maria https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-216428 Mon, 12 Feb 2018 14:39:49 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-216428 How do you hold the last value of a signal?

]]>
By: Joon https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-210089 Thu, 25 May 2017 13:24:48 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-210089 Thank you. This is very very useful post for me.

]]>
By: Koss M https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-209299 Fri, 12 May 2017 11:02:53 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-209299 Thanks a lot for your examples. What about the following case: when the hold is true we hold u value, but when the hold is zero we hold the next u value

]]>
By: Jonathan Currie https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-197303 Mon, 13 Feb 2017 03:41:29 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-197303 Exactly what I was looking for! Many thanks mate :)

]]>
By: Dani https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-185358 Thu, 01 Dec 2016 18:46:06 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-185358 In method 1 , 2 ,3 ….can i insert a sine wave as an input and a clock signal as the hold …. i tried that but didnt work …can anyone help ,plz ?

]]>
By: Guy Rouleau https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/#comment-168785 Sat, 18 Jun 2016 21:25:58 +0000 https://blogs.mathworks.com/seth/?p=3953#comment-168785 @Joel: Good point. The “Sample and Hold” block is included with the DSP System toolbox. If you look under the mask, you will see that it is infact a Triggered Subsystem. This is a solution very similar to the Enabled Subsystem approach mentioned in this post.

]]>