How do I obtain a data point at a certain time from timeseries based on a condition (simulink and matlab)?

2 次查看(过去 30 天)
I want to obtain the value of f(t) where t is the time that another fcn is equal to zero. I have a simulink model and I am thinking I will need a MatLab script to make this logic work.
To give a background, I want my model integration to "stop" at steady state. For now, I'm using switch blocks/limited integrators, but I can't run the model autonomously (i've been putting in constants).

回答(1 个)

Robert
Robert 2016-3-29
If I understand your question correctly, you are looking for an Enabled Subsystem. Look for either the Enabled Subsystem or the Enable block in the Simulink Library.
Enable the subsystem when your control signal is equal to zero and evaluate f(t) inside of that subsystem.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by