title: Integrating sampled points of periodic square signal in python
body: <p>I want to work out the integration between consecutive sampled points (i.e point i and point i+1 all the way to the end). I managed to do this for a sine wave using the definite integral, unsure how to do it for this signal, any thoughts?
  <a href="https://i.stack.imgur.com/KlnKG.png" rel="nofollow noreferrer">plot of periodic square signal with stars for points I want to integrate between</a></p>