How do I reset the time in Signal Editor block?
1 回表示 (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
Jordan Olson
2023 年 3 月 7 日
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.
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!