How do I reset the time in Signal Editor block?

1 view (last 30 days)
I have designed a signal using signal editor and it is placed in an enabled subsystem. During the run of my simulation, the sub system is usually enabled after certain time(t) depending on the satisfaction of a condition. The output from the signal editor is not from time zero but rather it is from time 't'. How do I make this signal editor run from time 0 when the subsystem is enabled?

Answers (1)

Jordan Olson
Jordan Olson on 7 Mar 2023
You can achieve this by using an "Integrator" block with a constant input feeding into a "1-D Lookup Table" where the breakpoints are the time axis. This is especially useful if you have a full timeseries before simulation. This method allows you to leverage the integrator's reset port to "reset" the signal by returning to index 1 in the table. Be sure to pick an interpolation setting appropriate for your system. For instance, if "linear" causes discontinuities in the signal slope, you can try "cubic spline" instead.

Products

Community Treasure Hunt

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

Start Hunting!