MATLAB: How can i detect the positive and negative peaks every rate of the input sinusoidal signal on simulink

peakssinusoidal signal

Hello everyone, i have a problem with my project on simulink, i have a sinusoidal signal input, its amplitude changes with time, i need to detect the positive and negative value of the peaks every rate, how can i do that ?

Best Answer

this is my simple model