Info

此问题已关闭。 请重新打开它进行编辑或回答。

How can I save the input value in the moment of activating a subsystem?

1 次查看(过去 30 天)
Hello,
I have a subsytem in Simulink with a variable input and I want to save the value of this input in the moment of activation of the subsystem. The subsystem is activated by an "If-Block".
I thought about saving the value with a "Data Store Write" Block. I need a Block in front of that, that lets the signal through only at the first step and afterwards blocks the signal. Or something like that.
Any ideas how I could do that?
Thanks in advance!
  3 个评论
Philipp
Philipp 2013-6-16
Is my question unclear? Should I be more precise? I thought the solution for this problem is not that complicated. But as I am new to Matlab and Simulink I have no idea how to do it.
Philipp
Philipp 2013-6-16
Okay, I finally found out how to do it.
I have a Constant Block set to Zero and after that a Memory Block with initial condition 1. This activates a enabled subsystem which has nothing in it but a connection from the input to output. It is only activated in the first step. After that it will continue putting out the value it had while it was activated.
Thank you anyway!

回答(0 个)

此问题已关闭。

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by