How to identify the highest value of a signal over time?

I have used to maximum block to identify the maximum out of two input vectors, and the maximum value changes based on the instantaneous value of the higher signal, but how do I find the maximum value it reaches over the simulation period? For example, I’m calculating the temperature and I want the highest value it reaches across 2 seconds of the simulation.

You can use a two-input Max block, with one input being the signal itself, and a second being the output of the Max block being fed though a Memory block. Attached is a simple example (PLECS Standalone) model and screenshots. Let me know if you have any questions.

overall_maximum_of_signal.plecs (9.48 KB)