Compare data at consecutive timesteps during runtime in Simulink
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ben Milne
am 26 Aug. 2020
Beantwortet: Fangjun Jiang
am 26 Aug. 2020
Hi all,
I'm trying to create a parachute model system for a rocket that will deploy when the altitude begins to decrease i.e. altitude at timestep n < altitude at timestep n-1.
I'm not entirely sure what the best way is to do this. I've played around with setting the altitude as a parameter of a masked subsystem but this didn't really work and made the simulation run significantly slower. Is there a fast way to extract a previous value of a logged signal?
Thanks!
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 26 Aug. 2020
Use a Unit Delay block, the input is altitude, the output is the "previous value" of the altitude.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating Custom Components and Libraries finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!