Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
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 Comments
Philipp
Philipp on 16 Jun 2013
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 on 16 Jun 2013
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!

Answers (0)

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!