MATLAB: How to smooth out the maximas and minimas of the following scope output in Simulink

simulink

I need know that I need to change the sample time through discretization to smooth out those peaks and I tried to use a power gui block to do it but it was ineffective. I would greatly appreciate any guidance

Best Answer

Matlab Function inherits the sampling time from the block connected to it. As the clock is connected as the input of the function block which does not have sampling time, output is not as expected. Add unity gain block as suggested in other post at the input of the function.
Related Question