I need to get peak value and time from a signal and use it in Simulink?

I am working in Simulink environment. What i want is to get peak values and times considering an oscillatory response of a system output. 1st peak, 2nd peak etc. I know to use 'stepinfo' feature in MATLAB but i need to stay in Simulink. For example, I should get peak value and time and change my controller parameters (like online tuning) and behavior regarding those obtentions. Any idea?
Thanks.

Asked:

on 11 Dec 2013

Commented:

on 16 Feb 2020

Community Treasure Hunt

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

Start Hunting!