Can anyone pls help me to find the peak of a curve in Simulink. I got a acceleration signal which is like sinewave with different peaks and falls. The system requires to detect and trigger output if the peak is above threshold of say value 5. This is part of embedded application hence it will be continuously running and detecting any peak above the threshold. Timing is crucial as the requirement for detect and trigger must happen not too late after the peak.