Hi. I want to realize a program where I want to generate a sine and take only the positive monotonic part.
So i tought to find the min and max index of the function and realize a program like the one attached.
As you can see if you set the frequency at 10Hz it works fine... the problem is when you change the frequency for example at 20 or 50H...it seems that it doesn't find the min and max properly.
Can you suggest me some tips?
Thank you