I am trying to create a pulse train of period 20 ms with a pulse width of 3ms. I am trying to use a fourier transform but I have the incorrect pulse width and I would only like to display the positive amplitude from 0 to A.
So I tried a different approach which I think is better than my first one. However, my period is wrong but the pulse width is right.
This is just a function to create a pulse signal normally using conditionals:
Of course the coefficients could easily be calculated directly and so you may define a one-liner function with T, L and Û as additional arguments: